
<?php
/**
 * DCRM Mobile Page
 *
 * This file is part of WEIPDCRM.
 * 
 * WEIPDCRM is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * WEIPDCRM is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with WEIPDCRM.  If not, see <http://www.gnu.org/licenses/>.
 */

require_once('system/common.inc.php');
base_url();

// URL For Rewrite 
$rewrite_mod = get_option('rewrite_mod');
switch($rewrite_mod){
	case 3:
		$rewrite_url = array('view' => 'view/%d', 'view_nohistory' => 'view/%d/nohistory', 'screenshot' => 'screenshot/%d', 'history' => 'history/%d', 'contact' => 'contact/%d', 'section' => 'section/%d', 'report' => 'report/%d', 'report_support' => 'report/%1$d/%2$d', 'more' => 'more/%d', 'more_offset' => 'more/%1$d/%2$d', 'misc' => 'misc');
		break;
	case 1:
	case 2:
	default:
		$rewrite_url = array('view' => 'index.php?method=view&amp;pid=%d', 'view_nohistory' => 'index.php?pid=%d&amp;addr=nohistory', 'screenshot' => 'index.php?method=screenshot&amp;pid=%d', 'history' => 'index.php?method=history&amp;pid=%d', 'contact' => 'index.php?method=contact&amp;pid=%d', 'section' => 'index.php?method=section&amp;pid=%d', 'report' => 'index.php?method=report&amp;pid=%d', 'report_support' => 'index.php?method=report&amp;pid=%1$d&amp;support=%2$d', 'more' => 'index.php?method=more&amp;pid=%d', 'more_offset' => 'index.php?method=more&amp;pid=%1$d&amp;offset=%2$d', 'misc' => 'misc.php');
		break;
}
function echo_rewrite_url($type, $variable1, $variable2=''){
	global $rewrite_url;
	echo SITE_URL;
	printf($rewrite_url[$type], $variable1, $variable2);
}

class_loader('Mobile_Detect');
$detect = new Mobile_Detect;
if(!$detect->isiOS()){
	if (DCRM_PCINDEX == 2) {
		header("Location: ".SITE_URL.$rewrite_url['misc']);
		exit();
	} else {
		$isCydia = false;
	}
} else {
	if (DCRM_MOBILE == 2) {
		if (!strpos($detect->getUserAgent(), 'Cydia')) {
			$isCydia = false;
		} else {
			$isCydia = true;
		}
	} else {
		exit('Access Denied');
	}
}
if (file_exists('Release')) {
	$release = file('Release');
	$release_origin = __('No Name');
	$release_mtime = filemtime('Release');
	$release_time = date('Y-m-d H:i:s',$release_mtime);
	foreach ($release as $line) {
		if(preg_match('#^Origin#', $line)) {
			$release_origin = trim(preg_replace("#^(.+):\\s*(.+)#","$2", $line));
		}
		if(preg_match("#^Description#", $line)) {
			$release_description = trim(preg_replace("#^(.+):\\s*(.+)#","$2", $line));
		}
	}
} else {
	$release_origin = __('Empty Page');
}
if (isset($_GET['pid'])) {
	if (ctype_digit($_GET['pid']) && intval($_GET['pid']) <= 10000) {
		function device_check(){
			global $detect;
			$device_type = array('iPhone', 'iPod', 'iPad');
			for ($i = 0; $i < count($device_type); $i++) {
				$check = $detect->version($device_type[$i]);
				if ($check !== false) {
					if (isset($_SERVER['HTTP_X_MACHINE'])) {
						$DEVICE = $_SERVER['HTTP_X_MACHINE'];
					} else {
						$DEVICE = 'Unknown';
					}
					$OS = str_replace('_', '.', $check);
					break;
				}
			}
			return array('DEVICE' => $DEVICE, 'OS' => $OS);
		}

		if (isset($_GET['method']) && $_GET['method'] == 'screenshot') {
			$index = 2;
			$title = __('View Screenshots');
		} elseif (isset($_GET['method']) && $_GET['method'] == 'report') {
			$device_info = device_check();
			if (!isset($_GET['support'])) {
				$index = 3;
			} else {
				if ($_GET['support'] == '1') {
					$support = 1;
				} elseif ($_GET['support'] == '2') {
					$support = 2;
				} elseif ($_GET['support'] == '3') {
					$support = 3;
				} else {
					$support = 0;
				}
				$index = 4;
			}
			$title = __('Report Problems');
		} elseif (isset($_GET['method']) && $_GET['method'] == 'history') {
			$index = 5;
			$title = __('Version History');
		} elseif (isset($_GET['method']) && $_GET['method'] == 'contact') {
			$index = 6;
			$title = __('Contact us');
		} elseif (isset($_GET['method']) && $_GET['method'] == 'section') {
			$index = 7;
			$title = __('Package Category');
		} elseif (isset($_GET['method']) && $_GET['method'] == 'more') {
			$index = 8;
			$section = DB::fetch_first("SELECT `Name`, `Icon` FROM `".DCRM_CON_PREFIX."Sections` WHERE `ID` = '".(int)$_GET['pid']."'");
			$q_name = DB::real_escape_string($section['Name']);
			if (isset($_GET['offset']) && !empty($_GET['offset']) && ctype_digit($_GET['offset'])) {
				$offset = intval($_GET['offset']);
			} else {
				$offset = 0;
			}
			$packages = DB::fetch_all("SELECT `ID`, `Name`,`PushStar`, `Package` FROM `".DCRM_CON_PREFIX."Packages` WHERE (`Stat` = '1' AND `Section` = '".$q_name."') ORDER BY `ID` DESC LIMIT 10 OFFSET ".$offset);
			foreach($packages as $package){
				if(!empty($package)){
					if ($isCydia) { ?>
				<a href="cydia://package/<?php echo($package['Package']); ?>" target="_blank">
<?php					} else { ?>
				<a href="<?php echo_rewrite_url('view', $package['ID']);?>">
<?php					} ?>
					<img class="icon" src="<?php echo(SITE_URL); ?>icon/<?php echo(empty($section['Icon']) ? 'default/unknown.png' : $section['Icon']); ?>">
					<div>
						<div>
							<label>
								<p><?php echo($package['Name']); ?></p><?php if($package['PushStar']!=0){echo'<span class="ui-btn3"  style="float:right;"><span style="color: #00EE00;">推荐</span></span>';} ?>
							</label>
						</div>
					</div>
				</a>
<?php
				}
			}
			exit();
		} elseif (!isset($_GET['method']) || (isset($_GET['method']) && $_GET['method'] == 'view')) {
			$index = 1;
			$title = __('View Package');
			$package_id = (int)DB::real_escape_string($_GET['pid']);
			$package_info = DB::fetch_first("SELECT `Name`, `GMDZ`,`GMKG`,`Version`,`ZXAZ`,`Lsdz`, `Author`,`Stls`, `Package`, `Description`, `DownloadTimes`, `Multi`, `CreateStamp`, `Size`, `Installed-Size`, `Section`, `Homepage`, `Tag`, `Level`, `Price`, `Purchase_Link`, `Changelog`, `Changelog_Older_Shows`, `Video_Preview`, `System_Support`, `ScreenShots` FROM `".DCRM_CON_PREFIX."Packages` WHERE `ID` = '".$package_id."' LIMIT 1");
			if ($package_info) $title = $title.' - '.$package_info['Name'];
		} else {
			httpinfo(405);
			exit();
		}
	} else {
		httpinfo(405);
		exit();
	}
} elseif (!isset($_GET['method'])) {
	$index = 0;
	$title = $release_origin;
} else {
	httpinfo(405);
	exit();
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title><?php echo($title); ?> | 最简洁的中文源</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta name="apple-mobile-web-app-title" content="<?php echo($release_origin); ?>" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
		<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta name="HandheldFriendly" content="true" />
      <mobile:mobile type="pc,mobile"/>
		<meta name="format-detection" content="telephone=no" />
		<meta name="robots" content="index, follow" />
       <link rel="stylesheet" href="<?php echo(SITE_URL); ?>css/youtiy.css" media="all">
<script src="<?php echo(SITE_URL); ?>ziyuan/js/udidtj.js"></script>
<script> 
jQuery(document).ready(function($) {
	$('.theme-login').click(function(){
		$('.theme-popover-mask').fadeIn(100);
		$('.theme-popover').slideDown(200);
	})
	$('.theme-poptit .close').click(function(){
		$('.theme-popover-mask').fadeOut(100);
		$('.theme-popover').slideUp(200);
	})
 
})
</script> 
<?php
if (defined("AUTOFILL_SEO")) {
?>
		<meta name="title" content="<?php echo(AUTOFILL_SEO); ?>" />
<?php
}
if (!empty($release_description)) {
?>
		<meta name="description" content="<?php echo($title); ?> ™| 最简洁的中文源，简单整洁有序的Cydia源，提供实用的DEB包。" />
<?php
}
if (defined("AUTOFILL_KEYWORDS")) {
?>
		<meta name ="keywords" content="<?php echo(AUTOFILL_KEYWORDS); ?>" />
<?php
}
if ($isCydia) {
?>
		<base target="_blank">
<?php
} else {
?>
		<base target="_top">
<?php
}
?>
		<link rel="apple-touch-icon" href="<?php echo(SITE_URL); ?>CydiaIcon.png">
		<link rel="shortcut icon" href="<?php echo(SITE_URL); ?>favicon.ico">
		<link rel="stylesheet" href="<?php echo(SITE_URL); ?>Cydia/menes.min.css">
        <link rel="stylesheet" href="<?php echo(SITE_URL); ?>css/search.css">
        <link rel="stylesheet" href="<?php echo(SITE_URL); ?>css/gundongcss.css">
		<link rel="stylesheet" href="<?php echo(SITE_URL); ?>css/scroll.min.css">
<?php if(is_rtl()){ ?>		<link rel="stylesheet" href="<?php echo(SITE_URL); ?>css/menes-rtl.min.css"><?php } ?>
<?php if(file_exists(ROOT.'css/font/'.($local_css = substr($locale, 0, 2)).'.css') || file_exists(ROOT.'css/font/' . ($local_css = $locale) . '.css')): ?>	<link rel="stylesheet" type="text/css" href="https<?php echo(SITE_URL); ?>css/font/<?php echo $local_css; ?>.css"><?php echo("\n"); endif; ?>
		<script src="<?php echo(SITE_URL); ?>js/fastclick.js" type="text/javascript"></script>
<?php
if ($isCydia){ 
?>      
      <script src="<?php echo(SITE_URL); ?>js/device.js" type="text/javascript"></script>
<?php
}
?>  
<script src="<?php echo(SITE_URL); ?>js/cydia.js" type="text/javascript"></script>      
<script src="<?php echo(SITE_URL); ?>js/menes.js" type="text/javascript"></script>
<script src="<?php echo(SITE_URL); ?>js/cytyle.js" type="text/javascript"></script>
<script src="<?php echo(SITE_URL); ?>fenlei/jquery.min.js"></script>      
<script src="<?php echo(SITE_URL); ?>js/1340_2.js" type="text/javascript"></script>
<script src="<?php echo(SITE_URL); ?>js/1340_3.js" type="text/javascript"></script> 
<script src="<?php echo(SITE_URL); ?>baohu.js" type="text/javascript"></script>
<script src="<?php echo(SITE_URL); ?>js/2_clipboard.min.js" type="text/javascript"></script>
   
<script src="<?php echo(SITE_URL); ?>js/gundongtj.js" type="text/javascript"></script>  
	</head>
<body class="pinstripe" id='body'>



    
		<panel>
<?php 
function is_qq() {
    $agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '' ;
    $browseragent = "";   //浏览器
    $browserversion = ""; //浏览器的版本
   if (preg_match( '/QQ\/(([0-9_.]{1,5})+)/',$agent,$version)) {
        $browserversion = $version[1];
        $browseragent = "QQ";   
    } else {
        $browserversion = "";
        $browseragent = "Unknown";
    }
    return $browseragent;
  }
?>    

<script src="<?php echo(SITE_URL); ?>js/fz.js" type="text/javascript"></script>  

<?php
$repo_url = base64_decode(DCRM_REPOURL);
if ($index == 0) {
	if (!$isCydia) {
?>
<script src="<?php echo(SITE_URL); ?>js/tcts.js" type="text/javascript"></script>  
			<fieldset style="background-color:#ffc040" class="box"><!--首页开始-->
<?php 
$qqtz = is_QQ();
if($qqtz == 'QQ'){
?> 
  <a href="cydia://url/https://cydia.saurik.com/api/share#?source=http:<?php echo(SITE_URL); ?>" target="_blank">            
<?php 
}else{
?> 
  <a href="javascript:;" id="down" target="_new">        
<?php 
}    
?>                
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/cydia.png" />
                  <div id="typedStrings" >
					<div>
						<div class="txtwav flip" >
							<label><p>
								<p><?php _e('点击前往Cydia<sup><small>™</small></sup>添加本源'); ?></p>
                            </label>						
						</div>
					</div>
                    </div>
				</a>
			</fieldset>
<?php
	}
?>
<div id="weixin" style="display:none">
    <div class="click_opacity"></div>
    <div class="to_btn">
    	<span class="span1"><img src="<?php echo(SITE_URL); ?>/click_btn.png"></span>
        <span class="span2"><em>1</em> 点击右上角<img src="<?php echo(SITE_URL); ?>/menu.png">打开菜单</span>
        <span class="span2"><em>2</em> 选择<img src="<?php echo(AUTOFILL_SITE); ?>/safari.png">用Safari打开下载</span>
    </div>
</div>


			<fieldset class="box">
				<div>
					<div style="float: right; vertical-align: middle; text-align: center; width: 200px">
						<span style="font-size: 24px">
							<?php echo($release_origin); ?><sup><small>™</small></sup>
						</span>
						<br/>
						<span style="font-size: 16px">
							<a class="panel" href="<?php echo(AUTOFILL_SITE); ?>"><?php echo(defined(AUTOFILL_FULLNAME) ? AUTOFILL_FULLNAME : AUTOFILL_MASTER); ?></a>
							<br />
							<a class="panel" href="mailto:<?php echo(AUTOFILL_EMAIL); ?>"><?php echo(AUTOFILL_EMAIL); ?></a>
						</span>
					</div>
                  
					<center><img class="icon" src="CydiaIcon.png" style="width:80px; height:80px; vertical-align: top;" /></center>
					<hr />
                 <p> <marquee scrollAmount=<?php echo(AUTOFILL_EMERGENCY3); ?> width="98%"><span style="color:<?php echo(AUTOFILL_EMERGENCY2); ?>"><?php echo( defined("AUTOFILL_EMERGENCY1") ? htmlspecialchars(stripslashes(AUTOFILL_EMERGENCY1)) : $null ); ?></span></marquee>
					
						<?php _e('Add this URL via Cydia<sup><small>™</small></sup>: '); ?>
						<br />
						<strong><a href="<?php echo($repo_url); ?>"><?php echo($repo_url); ?></a></strong>
					</p>
				</div>
			</fieldset>
         
<?php
	$num = DB::result_first("SELECT count(*) FROM `".DCRM_CON_PREFIX."Packages` WHERE `Stat` = '1'");
?>
   				
<?php
	if (!$isCydia) {
?>
<form action="mbsearch.php"  method="get" >
<center><span class="btn"><input type="search" name="name"  placeholder="搜索你想要的软件">
  <button type="submit" ><i></i>搜索</button></span></center>
</form>
<?php
   }
?>
<div class="wrapper">
  <div class="demo5 demof">
    <ul>
<?php
$packages = DB::fetch_all("SELECT `ID`, `DownloadTimes`, `Tjreason`,`PushStar`, `Name`,`Description`, `Icon2`,`Section`, `Package` FROM `".DCRM_CON_PREFIX."Packages` WHERE (`Stat` = '1' AND `Recommend` = '1') ORDER BY `CreateStamp` DESC limit 0,8"  );
foreach($packages as $package) {
?> 
      <li>
<?php	if ($isCydia) { ?>
        <a href="cydia://package/<?php echo($package['Package']); ?>"><p style="width:300px; white-space:nowrap;overflow:hidden;text-overflow:ellipsis; border:1px"><span style="color:#050505 ">源主推荐：<img src="<?php echo(SITE_URL); ?>icon/<?php echo(empty($package['Icon2']) ? 'default/unknown.png' : $package['Icon2']); ?>" height="20" width="20" />&nbsp;<?php echo($package['Name']); ?>&nbsp;点击查看</span></p></a>
<?php				} else { ?>
		<a href="<?php echo_rewrite_url('view', $package['ID']);?>"><p style="width:300px; white-space:nowrap;overflow:hidden;text-overflow:ellipsis; border:1px"><span style="color:#050505">源主推荐：<img src="<?php echo(SITE_URL); ?>icon/<?php echo(empty($package['Icon2']) ? 'default/unknown.png' : $package['Icon2']); ?>" height="20" width="20" />&nbsp;<?php echo($package['Name']); ?>&nbsp;点击查看</span></p></a>
<?php				} ?>      

        
      </li>
<?php
		}
?>
    </ul>
  </div>
</div>                 
            
			<block class="box1" style="background-color: #FFFFFF;">
<p style="font-size: 14px;"><span id="sitetime"></span></p><hr>
                  
				<p>
					<?php printf( __( '<strong>%d</strong> packages in total.' ) , $num ); ?> 
				</p>
				<?php if(isset($release_time)): ?>
				<!--p>
					<?php printf( __( 'Last updated: <strong>%s</strong>' ) , $release_time ); ?> 
				</p-->
				<?php endif; ?>
			</block>
           
			</fieldset>
  <!--轮播--> 
<?php

		if (DCRM_DIRECT_DOW2 == 2) {
?>
             
			
					<div class="box" style="height: 120px;">
					<ul>
						<li id="fuck5h" style="display: none;"><a href="<?php echo(AUTOFILL_Homelunbo); ?>" target="_blank" class=""><img id="fuck5hous" class="bigpic" src="./manage/Speed/icon/lunbo1.png"></a></li>					  
						<li id="fuck5h0" style="display: list-item;"><a href="<?php echo(AUTOFILL_Homelunbo2); ?>" target="_blank" class=" "><img class="bigpic" src="./manage/Speed/icon/lunbo2.png"></a></li>
					</ul>
				</div>	
			
	           
<?php
}
?>
   <fieldset class="box">	           
              
              <ul class="doubleCol">  

<?php
	
	if (defined("AUTOFILL_HomePod") && defined("AUTOFILL_HomePod_NAME")) {
?>              
                <li class="borderRight">
				<a href="<?php echo(AUTOFILL_HomePod); ?>" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh1.png" />
					<div>
						<div>
							<label>
								<p><?php echo(AUTOFILL_HomePod_NAME); ?></p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                  </li>
                  
                  
<?php
	}
	if (defined("AUTOFILL_HomeEmail") && defined("AUTOFILL_HomeEmail_NAME")) {
?>
                <li class="borderRight">
				<a href="mailto:<?php echo(AUTOFILL_HomeEmail); ?>" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh2.png" />
					<div>
						<div>
							<label>
								<p><?php echo(AUTOFILL_HomeEmail_NAME); ?></p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                  </li>
<?php
	}
	if (defined("AUTOFILL_TENCENT") && defined("AUTOFILL_TENCENT_NAME")) {
?>
                  <li class="borderRight">
				<a href="<?php echo(AUTOFILL_TENCENT); ?>" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh3.png" />
					<div>
						<div>
							<label>
								<p><?php echo(AUTOFILL_TENCENT_NAME); ?></p>
							</label>
						</div>
					</div>
                  </div>
				</a>
                    </li>
<?php
	}
	if (defined("AUTOFILL_WEIBO") && defined("AUTOFILL_WEIBO_NAME")) {
?>
                    <li class="borderRight">
				<a href="<?php echo(AUTOFILL_WEIBO); ?>" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh4.png" />
					<div>
						<div>
							<label>
								<p><?php echo(AUTOFILL_WEIBO_NAME); ?></p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                      </li>
<?php
	}
	if (defined("AUTOFILL_TWITTER") && defined("AUTOFILL_TWITTER_NAME")) {
?>
                      <li class="borderRight">
				<a href="<?php echo(AUTOFILL_TWITTER); ?>" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh5.png" />
					<div>
						<div>
							<label>
								<p><?php echo(AUTOFILL_TWITTER_NAME); ?></p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                        </li>
<?php
	}
	if (defined("AUTOFILL_FACEBOOK") && defined("AUTOFILL_FACEBOOK_NAME")) {
?>
                        <li class="borderRight">
				<a href="<?php echo(AUTOFILL_FACEBOOK); ?>" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh6.png" />
					<div>
						<div>
							<label>
								<p><?php echo(AUTOFILL_FACEBOOK_NAME); ?></p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                          </li>
<?php
	}
	if (defined("AUTOFILL_PAYPAL")&& defined("AUTOFILL_PAYPAL_NAME")) {
?>
                          <li class="borderRight">
				<a href="<?php echo(htmlspecialchars(AUTOFILL_PAYPAL)); ?>" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh7.png" />
					<div>
						<div>
							<label>
								<p><?php echo(AUTOFILL_PAYPAL_NAME); ?></p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                            </li>
<?php
	}
	if (defined("AUTOFILL_ALIPAY")&& defined("AUTOFILL_ALIPAY_NAME")) {
?>
         <li class="borderRight">
				<a href="<?php echo(htmlspecialchars(AUTOFILL_ALIPAY)); ?>" onclick="dashangToggle()"  class=" cytyle-dn  cytyle-dn  cytyle-dn">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh8.png"/>
					<div>
						<div>
							<label>
								<p>
									<?php echo(AUTOFILL_ALIPAY_NAME); ?>
								</p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                 </li> 
                
   <div class="hide_box" style="display: none;"></div>
    <div class="shang_box" style="display: none;">
    	<a class="shang_close  cytyle-dn  cytyle-dn  cytyle-dn" href="javascript:void(0)" onclick="dashangToggle()" title="关闭"><img src="http://mycydia.vip/icons/close.jpg" alt="取消"></a>
        <img class="shang_logo" src="http://mycydia.vip/icons/logos.png" alt="布斯中文推送源™">
    	<div class="shang_tit">
    		<p>感谢捐助，您所捐助的资金将用于源维护。</p>
    	</div>
    	<div class="shang_payimg">
    		<img src="http://mycydia.vip/icons/weipayimg.jpg" alt="扫码支持我们" title="扫一扫">
    	</div>
    		<div class="pay_explain">扫码打赏，你说多少就多少</div>
    	<div class="shang_payselect">
    		<div class="pay_item checked" data-id="weipay">
	    		<span class="radiobox"></span>
	    		<span class="pay_logo"><img src="http://mycydia.vip/icons/wechat.jpg" alt="微信"></span>
    	    </div>
    		<div class="pay_item" data-id="alipay">
			    <a href="HTTPS://QR.ALIPAY.COM/FKX06740ZMZSP9EDWXJO2E" target="_blank" class=" cytyle-dn">
	    		<span class="radiobox"></span>
	    		<span class="pay_logo"><img src="http://mycydia.vip/icons/alipay.jpg" alt="支付宝"></span>
				</a>
    		</div>
    	</div>
    	<div class="shang_info">
    		<p>保存截图，打开<span id="shang_pay_txt">微信</span>扫一扫，即可进行扫码打赏哦</p>
    		<p><a href="http://mycydia.vip/" target="_blank" title="布斯中文推送源™">布斯中文推送源™</a> | 分享从这里开始，精彩与您同在</p>
    	</div>
    </div>            
                
            

<?php
	}
?>
</ul>
         <ul class="doubleCol">
                <li class="borderRight">
				<a href="<?php echo(SITE_URL); ?>ios9.php" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/Cydia/ios9.png" />
					<div>
						<div><!--10--> 
							<label>
								<p>IOS9分类</p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                  </li>    
                <li class="borderRight">
				<a href="<?php echo(SITE_URL); ?>ios10.php" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/Cydia/ios10.png" />
					<div>
						<div><!--10--> 
							<label>
								<p>IOS10分类</p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                  </li> 
        </ul>
				<a href="<?php echo(SITE_URL); ?>ios11.php" target="_blank">
				<img class="icon" src="<?php echo(SITE_URL); ?>/Cydia/ios11.png" />
					<div>
						<div>
							<label>
								<p>iOS11分类 施工中🚧</p>
								<span style="color: #6e6d6d; float:right;">
									<l style="font-size: 8px;">
										随时回来看看👻<br/>
										资源不断添加中...
									</l>
								</span>
							</label>
						</div>
					</div>
				</a>
				<a href="<?php echo(SITE_URL); ?>Sections1.php" target="_blank">
				<img class="icon" src="<?php echo(SITE_URL); ?>/Cydia/ios.png" />
					<div>
						<div>
							<label>
								<p>IOS应用插件归类🚧</p>
								<span style="color: #6e6d6d; float:right;">
									<l style="font-size: 8px;">
										随时回来看看👻<br/>
										资源不断添加中...
									</l>
								</span>
							</label>
						</div>
					</div>
				</a>  
<?php
	
	if (defined("AUTOFILL_CUSTOM")) {
?>

				<a href="<?php echo(htmlspecialchars(AUTOFILL_CUSTOM)); ?>" target="_blank" class="">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh9.png" />
					<div>
						<div>
							<label>
								<p><?php echo(AUTOFILL_CUSTOM_NAME); ?></p>
							</label>
						</div>
					</div>
				</a>
     


<?php
	}
	if (defined("AUTOFILL_CUSTOMONE")) {
?>

				<a href="<?php echo(htmlspecialchars(AUTOFILL_CUSTOMONE)); ?>" target="_blank" class="">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh10.png"/>
					<div>
						<div>
							<label>
								<p>
									<?php echo(AUTOFILL_CUSTOMONE_NAME); ?>
								</p>
							</label>
						</div>
					</div>
				</a>

<?php
	}
require_once 'qqlogin/function.php';
require_once 'qqlogin/Connect2.1/qqConnectAPI.php';  
?> 
       
<div class="theme-popover">
     <div class="theme-poptit">
	      提交反馈意见
          <a href="javascript:;" title="关闭" class="close">×</a>
     </div>
     <div class="theme-popbod dform">
           <form class="theme-signin2"style="margin-left:-50px;margin-top:-60px;"  name="loginform" action="" method="get">
                <ol>
                     <label><strong style="margin-left:50px;">反馈标题</strong></label><label><input class="ipt" style="width:300px;"type="text" name="Title" size="20" /></label><br><br>
                     <label><strong style="margin-left:50px;">反馈内容</strong></label><label><input class="ipts" style="width:300px;" type="text" placeholder="请输入您的问题" name="content" size="20"></label>
                     <br><br><label><input class="btn2 btn-primary" style="margin-left:50px;" type="submit" name="submit" value=" 提交 " /></label>
                </ol>
           </form>
     </div>
</div>
<div class="theme-popover-mask"></div>    
     <?php if(!isset($_SESSION["accesstoken"]) || !isset($_SESSION["openid"])) { ?>
		      <a href="<?php echo(SITE_URL); ?>/qqlogin/qqlogin.php" target="_blank">
				<img class="icon" src="<?php echo(SITE_URL); ?>/icon/sc.png">
				<div>
                      <div>
                         <label>
                            <p>登录反馈系统</p>
                           <span class="ui-btn3" style="float:right;"><span style="color: #808080;">登录</span></span>
                         </label>
                      </div>
                    </div>
	  </a> 

<?php } else { 
    $qc = new QC($_SESSION["accesstoken"],$_SESSION["openid"]);
    $arr = $qc->get_user_info();           
?>      
			
				<a class="theme-login" href="javascript:;">
					<img class="icon" src="icon/7.png">
					<div>
						<div>
							<label>
								<p id="source-name">一键反馈系统</p>
                              <span class="ui-btn3"  style="float:right;"><span style="color: #808080;">反馈</span></span>
							</label>
						</div>
					</div>
				</a>
                    <a href="<?php echo(SITE_URL); ?>favourite.php">
				<img class="icon" src="<?php echo(SITE_URL); ?>/icon/user.png">
					<div>
						<div>
						<p>会员个人中心</p>
						</div>
					</div>
				</a> 
			
<?php
}
?>  
<?php
function kmtype2(){ 

$appid=AUTOFILL_WXAPPID;
$secret=AUTOFILL_WXKEYID;
$template_id=AUTOFILL_GDOPENID;
$openid=AUTOFILL_WXOPENID;
$ac = file_get_contents('https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='.$appid.'&secret='.$secret);
$wxt = json_decode($ac,true);
$url = 'https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=' . $wxt['access_token'];//access_token改成你的有效值
$time=date("Y-m-d h:i:s");   
$usertjgd=$arr['nickname'];
$ress = DB::query("SELECT * FROM `".DCRM_CON_PREFIX."User` WHERE `Openid`='".$_SESSION['openid']."'");
foreach($ress as $res){       
$nameuser=$res['User'];
  $useropen=$_SESSION['openid'];
$Feedback=$_GET['content'];  
$orderid=date('YmdHis') . rand(1000,9999);  
}
$data = array(
    'first' => array(
        'value' => '新工单提醒！',
        'color' => '#FF0000'
    ),
    'keyword1' => array(
        'value' => 'MYY-'.$orderid,
        'color' => '#FF0000'
    ),
    'keyword2' => array(
        'value' => '用户'.$nameuser.'提交了一个新的工单：'.$Feedback,
        'color' => '#FF0000'
    ),
    'keyword4' => array(
        'value' => $time,
        'color' => '#FF0000'
    ),  
    'remark' => array(
        'value' => '待处理任务！',
        'color' => '#FF0000'
    )
);
$template_msg=array('touser'=>$openid,'template_id'=>$template_id,'topcolor'=>'#FF0000','url' => 'http://mycydia.vip/wxfkhf.php?id='.$useropen,'data'=>$data); 
$curl = curl_init($url);
$header = array();
$header[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
// 不输出header头信息
curl_setopt($curl, CURLOPT_HEADER, 0);
// 伪装浏览器
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36');
// 保存到字符串而不是输出
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// post数据
curl_setopt($curl, CURLOPT_POST, 1);
// 请求数据
curl_setopt($curl,CURLOPT_POSTFIELDS,json_encode($template_msg));
$response = curl_exec($curl);
curl_close($curl);  
 //echo $response;      
} 
?>  
 <?php 
if(isset($_GET['Title'])||isset($_GET['content'])){  
if($_GET['Title']==null or $_GET['content']==null){
  echo "<script> alert('工单内容不能为空');</script>"; 
}else{ 
$OPENID=$_SESSION['openid'];  
$content=$_GET["content"];
$Title=$_GET['Title'];  
$date=date("Y-m-d h:i:s"); 

if($row=DB::result_first("SELECT ID,UserOpenID,Title,Feedback,Reply,SubmissTime,RecoveryTime,KnotOrder FROM `".DCRM_CON_PREFIX."Worklist` WHERE `KnotOrder`<'1' and `UserOpenID`='".$_SESSION['openid']."'")){   
 echo "<script> alert('您当前有工单尚未结单处理！请勿重复提交！');parent.location.href='".$_SESSION["preUrl"]."'; </script>"; 
}else{   
 
$query = DB::query("INSERT INTO `".DCRM_CON_PREFIX."Worklist` (ID,UserOpenID,Title,Feedback,Reply,SubmissTime,RecoveryTime,KnotOrder) VALUES ('','$OPENID','$Title','$content','','$date','$date','0')");
  echo "<script> alert('您的反馈我们已经收到，我们将尽快与您回复！');parent.location.href='".$_SESSION["preUrl"]."';</script>"; 
  $fkwx=kmtype2();
}
}
}
?>  
    </fieldset> 

<?php
	if (DCRM_SHOWLIST == 2) {
		$sections = DB::fetch_all("SELECT `ID`, `Name`, `Icon` FROM `".DCRM_CON_PREFIX."Sections`");
		if (empty($sections)) {
?>
			<block>
				<p>
					<?php _e('No Section.'); ?>
				</p>
			</block>
<?php
		} else {
			foreach($sections as $section){
?>
		<label><p><?php echo($section['Name']); ?></p></label>
			<fieldset class="box">
<?php
				$packages = DB::fetch_all("SELECT `ID`, `Name`, `Package`, `PushStar` FROM `".DCRM_CON_PREFIX."Packages` WHERE (`Stat` = '1' AND `Section` = '".DB::real_escape_string($section['Name'])."') ORDER BY `ID` DESC LIMIT " . DCRM_SHOW_NUM);
				foreach($packages as $package) {
					if ($isCydia) { ?>
				<a href="cydia://package/<?php echo($package['Package']); ?>" target="_blank">
<?php				} else { ?>
				<a href="<?php echo_rewrite_url('view', $package['ID']);?>">
<?php				} ?>
					<img class="icon" src="<?php echo(SITE_URL); ?>icon/<?php echo(empty($section['Icon']) ? 'default/unknown.png' : $section['Icon']); ?>">
					<div>
						<div>
							<label>
								<p><?php echo($package['Name']); ?></p><?php if($package['PushStar']!=0){echo'<span class="ui-btn3"  style="float:right;"><span style="color: #00EE00;">推荐</span></span>';} ?>
							</label>
						</div>
					</div>
				</a>
<?php
				}
				if (DCRM_ALLOW_FULLLIST == 2) {
?>
				<a href="<?php echo_rewrite_url('section', $section['ID']); ?>">
					<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/moreinfo.png" />
					<div>
						<div>
							<label>
								<p><?php _e('More...'); ?></p>
							</label>
						</div>
					</div>
				</a>
<?php
				}
?>
			</fieldset>
<?php
			}
		}
	}
	if (!$isCydia) {
?>
			<label class="source">
				<p><?php _e('Source Info'); ?></p>
			</label>
			<fieldset class="source box">
				<a href="/">
					<img class="icon" src="<?php echo(SITE_URL); ?>CydiaIcon.png" />
					<div>
						<div>
							<label>
								<p id="source-name">
									<?php echo($release_origin); ?>
								</p>
							</label>
						</div>
					</div>
				</a>
				<div class="source-description" >
					<p><marquee scrollAmount=<?php echo(AUTOFILL_DESCRIPTION3); ?> width="98%"><span style="color:<?php echo(AUTOFILL_DESCRIPTION2); ?>"><?php echo( defined("AUTOFILL_DESCRIPTION1") ? htmlspecialchars(stripslashes(AUTOFILL_DESCRIPTION1)) : $null ); ?></marquee></p>
				</div>
			</fieldset>
			<footer id="footer" style="display: none;">
				<p>
					<span id="id"><?php _e('Index'); ?></span>
					<br />
					<span class="source-name"><?php echo( defined("AUTOFILL_FOOTER_NAME") ? htmlspecialchars(stripslashes(AUTOFILL_FOOTER_NAME)) : $release_origin ); ?></span>
					<span id="section"><?php printf( __( 'Copyright &copy; %s' ) , defined("AUTOFILL_FOOTER_YEAR") ? htmlspecialchars(stripslashes(AUTOFILL_FOOTER_YEAR)).'-'.date("Y") : date("Y") ); ?></span>
					<?php if(defined("AUTOFILL_FOOTER_CODE")){ ?>
					<br />
					<span id="code"><?php echo(stripslashes(AUTOFILL_FOOTER_CODE));?></span>
					<?php } ?>
				</p>
			</footer>
<?php
	}
} elseif ($index == 1) {
	if (!$package_info) {
?>
			<block>
				<p>
					<?php _e('Invalid package!<br />Perhaps this package has been deleted by us.'); ?>
				</p>
			</block>
<?php
	} else {
		if (!$isCydia) {
?>

<script>(function(){
var src = (document.location.protocol == "http:") ? "http://js.passport.qihucdn.com/11.0.1.js?ac2ed4c8111f69164c6315f8f19a50da":"https://jspassport.ssl.qhimg.com/11.0.1.js?ac2ed4c8111f69164c6315f8f19a50da";
document.write('<script src="' + src + '" id="sozz"><\/script>');
})();
</script>           
           
              
  <script type="text/javascript">
  $(function(){
$(document).on('click','#ios9tip', function () {
  $.popup('.popup-about');
});
$(document).on('click','#cra_tip', function () {
  $.popup('.popup-about2');
});
$(document).on('click','#cra_tip1', function () {
  $.popup('.popup-about3');
});
function is_ios9() {
	if((navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i))) {
		return Boolean(navigator.userAgent.match(/OS [9-9]_\d[_\d]* like Mac OS X/i));
	} else {
		return false;
	}
}

function is_weixin(){
	var ua = navigator.userAgent.toLowerCase();
	if(ua.match(/MicroMessenger/i)=="micromessenger") {
		return true;
	} else {
		return false;
	}
}
function is_QQ(){
	var ua = navigator.userAgent.toLowerCase();
	if(ua.match(/QQ/i)=="QQ") {
		return true;
	} else {
		return false;
	}
}    
function show(titles,texts){
    $.modal({
	  title:  titles,
      text: texts,
      buttons: [
        {
          text: '我知道了',
          bold: true
        },
      ]
    })
}

$(document).on("click","#down",function(){
	var browser = {
		versions: function() {
			var u = navigator.userAgent, app = navigator.appVersion;
			return {
				trident: u.indexOf('Trident') > -1,
				presto: u.indexOf('Presto') > -1,
				webKit: u.indexOf('AppleWebKit') > -1,
				gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,
				mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/),
				ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
				android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,
				iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1,
				iPad: u.indexOf('iPad') > -1,
				webApp: u.indexOf('Safari') == -1
			};
		}()
	}
	if (browser.versions.ios || browser.versions.iPhone || browser.versions.iPad) {
		//微信打开时 系统为ios
		if(is_weixin()){
			$('#weixin').show();
			return ;
		} else {
			//系统为ios  不是微信打开
			if(is_ios9()){
				//ios9提示
				$('#ios9tip').show();
			}
		}
	} else {
		//弹出提示不是 ios 设备
		$('#down').hide();
		$('#down_tip').html("当前程序只支持苹果IOS设备");
		$('#down_tip').show();
		show("非常抱歉","当前程序只支持苹果IOS设备。");
		return ;
	}
	//下载
	window.location.href = 'cydia://url/https://cydia.saurik.com/api/share#?source=http:<?php echo(SITE_URL); ?>&package=<?php echo($package_info['Package']); ?>';
	$.showPreloader();
	setTimeout(function () {
		$('#install_tips').show();
		$('#cra_tip').show();
		$('#cra_tip1').show();
		$('#down').hide();
		$.hidePreloader();
	}, 2000);
});
})            
        </script> 
              
			<fieldset id="cydialink" style="display: none; background-color:#ffc040" class="box">
				
<?php 
$qqtz = is_QQ();
if($qqtz == 'QQ'){
?> 
  <a href="cydia://url/https://cydia.saurik.com/api/share#?source=http:<?php echo(SITE_URL); ?>&amp;package=<?php echo($package_info['Package']); ?>" target="_blank">            
<?php 
}else{
?> 
  <a href="javascript:;" id="down" target="_new">        
<?php 
}    
?>               
              
              
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/cydia.png" />
					<div>
						<div class="txtwav flip" >
							<label>
								<p><?php _e('点击前往Cydia<sup><small>™</small></sup>查看软件包'); ?></p>
							</label>
						</div>
					</div>
				</a>
			</fieldset>
<div id="weixin" style="display:none">
  <div class="click_opacity"></div>
    <div class="to_btn">
    	<span class="span1"><img src="<?php echo(SITE_URL); ?>/click_btn.png"></span>
        <span class="span2"><em>1</em> 点击右上角<img src="<?php echo(SITE_URL); ?>/menu.png">打开菜单</span>
        <span class="span2"><em>2</em> 选择<img src="<?php echo(SITE_URL); ?>/safari.png">用Safari打开下载</span>
    </div>
</div>
<?php
			if (!empty($package_info['Section'])) {
				$section_icon = DB::result_first("SELECT `Icon` FROM `".DCRM_CON_PREFIX."Sections` WHERE `Name` = '".$package_info['Section']."' LIMIT 1");
			}
?>
			<div id="header" style="display: none;">
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/<?php echo(empty($section_icon) ? 'default/unknown.png' : $section_icon); ?>" style="width: 64px; height: 64px; vertical-align: top;" />
				<div id="content">
					<p id="name"><?php echo($package_info['Name']); ?></p>
					<p id="latest"><?php echo($package_info['Version']); ?></p>
					<div id="extra">
                       <p>软件包大小:<?php echo(sizeext($package_info['Size'])); ?></p>
					</div>
				</div>
			</div>
              
<?php
			if (!empty($package_info['Author'])) {
				$author_name = trim(preg_replace("#^(.+)<(.+)>#","$1", $package_info['Author']));
				$author_mail = trim(preg_replace("#^(.+)<(.+)>#","$2", $package_info['Author']));
			}
?>
			<fieldset class="box" id="contact" style="display: none;">  
				<a href="<?php echo_rewrite_url('contact', $_GET['pid']); ?>">
					<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/email.png" />
					<div>
						<div>
							<label>
								<p><?php _e('Author'); ?></p>
							</label>
							<label class="detail">
									<p id="contact">
										<?php echo($author_name); ?>
									</p>
							</label>
						</div>
					</div>
				</a>
			</fieldset>
              
<?php
		}
		if (DCRM_DIRECT_DOWN == 1 && !$isCydia && !check_commercial_tag($package_info['Tag'])) {
?>
			<fieldset>
				<a href="<?php echo(SITE_URL); ?>debs/<?php echo($_GET['pid']); ?>.deb" id="downloadlink" style="display: none;" target="_blank">
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/packages.png" />
					<div>
						<div>
							<label>
								<p><?php _e('Download'); ?></p>
							</label>
							<label class="detail">
									<p>
										<?php if(!empty($package_info['Size'])){echo(sizeext($package_info['Size']));} ?>
									</p>
							</label>
						</div>
					</div>
				</a>
			</fieldset>
<?php
		}
?>
<?php

		if (DCRM_DIRECT_DOW2 == 2) {
?>

						
       <div class="box" style="height: 120px;">
					<ul>
						<li id="fuck5h" style="display: none;"><a href="<?php echo(AUTOFILL_Homelunbo); ?>" target="_blank" class=""><img id="fuck5hous" class="bigpic" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/lunbo1.png"></a></li>					  
						<li id="fuck5h0" style="display: list-item;"><a href="<?php echo(AUTOFILL_Homelunbo2); ?>" target="_blank" class=" "><img class="bigpic" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/lunbo2.png"></a></li>
					</ul>
				</div> 

			
 <?php
}
		if (DCRM_DIRECT_DOW3 == 2) {
?>             
  <audio  id="bgmusic" style="display:block; margin:10px auto;" autoplay preload loop controls></audio>
 <?php
}	
?>
 <?php
	
		// Compatibility Check
		if (!empty($package_info['System_Support'])){
			$system_support = unserialize($package_info['System_Support']);
			if ($isCydia){
				$device_info = device_check();
$SHEBEIYES = AUTOFILL_SHEBEIYES_NAME;
  $SHEBEINO = AUTOFILL_SHEBEINO_NAME;
				if (version_compare($system_support['Minimum'], $device_info['OS'], '<=') && version_compare($device_info['OS'], $system_support['Maxmum'], '<=')){
					$Compatibility_Settings = array('color' => '#66B3FF', 'text' => $SHEBEIYES.__('系统版本:iOS').$device_info['OS'].__('兼容该软件包').$SHEBEIYES);//兼容
				} else {
					$Compatibility_Settings = array('color' => '#FF4500', 'text' => $SHEBEINO.__('系统版本:iOS').$device_info['OS'].__('不兼容该软件包').$SHEBEINO);//本兼容
				}
require_once('iphone.php');
?>
  			<fieldset class="box1" style="background-color:<?php echo($Compatibility_Settings['color']); ?>">
				<div>
					<p>
                   <center> <span class="box1" style='color:white'><?php _e('您的设备为:'); ?><?php echo getPhone();?></span></center><hr>
					<center> <span class="box1" style='color:white'><?php echo($Compatibility_Settings['text']); ?></span></center>
					</p>
				</div>
			</fieldset> 
             

<?php
              
 }
    }
?> 
              
<?php
if ($isCydia) {      
require_once('commercial.php');

}
 ?>
<?php              
if (!$isCydia) {
?>
<form action="http://mycydia.vip/mbsearch.php"  method="get" >
<center><span class="btn"><input type="search" name="name"  placeholder="搜索你想要的软件">
  <button type="submit" ><i></i>搜索</button></span></center>
</form>
<?php
   }
?>
 <div class="wrapper">
  <div class="demo5 demof">
    <ul>
<?php
$packages = DB::fetch_all("SELECT `ID`, `DownloadTimes`, `Tjreason`,`PushStar`, `Name`,`Description`, `Icon2`,`Section`, `Package` FROM `".DCRM_CON_PREFIX."Packages` WHERE (`Stat` = '1' AND `Recommend` = '1') ORDER BY `CreateStamp` DESC limit 0,8"  );
foreach($packages as $package) {
?> 
      <li>
<?php	if ($isCydia) { ?>
        <a href="cydia://package/<?php echo($package['Package']); ?>"><p style="width:300px; white-space:nowrap;overflow:hidden;text-overflow:ellipsis; border:1px"><span style="color:#050505">源主推荐：<img src="<?php echo(SITE_URL); ?>icon/<?php echo(empty($package['Icon2']) ? 'default/unknown.png' : $package['Icon2']); ?>" height="20" width="20" />&nbsp;<?php echo($package['Name']); ?>&nbsp;点击查看</span></p></a>
<?php				} else { ?>
		<a href="<?php echo_rewrite_url('view', $package['ID']);?>"><p style="width:300px; white-space:nowrap;overflow:hidden;text-overflow:ellipsis; border:1px"><span style="color:#050505">源主推荐：<img src="<?php echo(SITE_URL); ?>icon/<?php echo(empty($package['Icon2']) ? 'default/unknown.png' : $package['Icon2']); ?>" height="20" width="20" />&nbsp;<?php echo($package['Name']); ?>&nbsp;点击查看</span></p></a>
<?php				} ?>       

        
      </li>
<?php
		}
?>
    </ul>
  </div>
</div>                           
 <div class="hide_box" style="display: none;"></div>
    <div class="shang_box" style="display: none;">
    	<a class="shang_close  cytyle-dn  cytyle-dn  cytyle-dn" href="javascript:void(0)" onclick="dashangToggle()" title="关闭"><img src="http://mycydia.vip/icons/close.jpg" alt="取消"></a>
        <img class="shang_logo" src="http://mycydia.vip//icons/logos.png" alt="布斯中文推送源™">
    	<div class="shang_tit">
    		<p>感谢捐助，您所捐助的资金将用于源维护。</p>
    	</div>
    	<div class="shang_payimg">
    		<img src="http://mycydia.vip//icons/weipayimg.jpg" alt="扫码支持" title="扫一扫">
    	</div>
    		<div class="pay_explain">扫码打赏，你说多少就多少</div>
    	<div class="shang_payselect">
    		<div class="pay_item checked" data-id="weipay">
	    		<span class="radiobox"></span>
	    		<span class="pay_logo"><img src="http://mycydia.vip/icons/wechat.jpg" alt="微信"></span>
    	    </div>
    		<div class="pay_item" data-id="alipay">
			    <a href="HTTPS://QR.ALIPAY.COM/FKX06740ZMZSP9EDWXJO2E" target="_blank" class=" cytyle-dn">
	    		<span class="radiobox"></span>
	    		<span class="pay_logo"><img src="http://mycydia.vip/icons/alipay.jpg" alt="支付宝"></span>
				</a>
    		</div>
    	</div>
    	<div class="shang_info">
    		<p>保存截图，打开<span id="shang_pay_txt">微信</span>扫一扫，即可进行扫码打赏哦</p>
    		<p><a href="http://mycydia.vip/" target="_blank" title="布斯中文推送源™">布斯中文推送源™</a> | 分享从这里开始，精彩与您同在</p>
    	</div>
    </div>   
  <fieldset class="box">                          
<?php
		if ($isCydia && DCRM_REPORTING == 2) {
?>
				<a href="<?php echo_rewrite_url('report', $_GET['pid']); ?>" id="reportlink">
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/report.png" />
					<div>
						<div>
							<label>
								<p><?php _e('Report Problems'); ?></p>
							</label>
						</div>
					</div>
				</a>
 
           			
<?php
		}
		if (!empty($package_info['Homepage']) && DCRM_MOREINFO == 2) {
?>
				<a href="<?php echo($package_info['Homepage']); ?>" target="_blank">
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/web.png" />
					<div>
						<div>
							<label>
								<p><?php _e('More Info'); ?></p>
							</label>
						</div>
					</div>
				</a>
<?php
		}
?>
              
			</fieldset>
  <!--软件包页面开始-->            
              <fieldset class="box">
               <ul class="doubleCol">  

<?php
	
	if (defined("AUTOFILL_HomePod") && defined("AUTOFILL_HomePod_NAME")) {
?>              
                <li class="borderRight">
				<a href="<?php echo(AUTOFILL_HomePod); ?>" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh1.png" />
					<div>
						<div><!--10--> 
							<label>
								<p><?php echo(AUTOFILL_HomePod_NAME); ?></p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                  </li>
                  
                  
<?php
	}
	if (defined("AUTOFILL_HomeEmail") && defined("AUTOFILL_HomeEmail_NAME")) {
?>
                <li class="borderRight">
				<a href="mailto:<?php echo(AUTOFILL_HomeEmail); ?>" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh2.png" />
					<div>
						<div><!--2--> 
							<label>
								<p><?php echo(AUTOFILL_HomeEmail_NAME); ?></p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                  </li>
<?php
	}
	if (defined("AUTOFILL_TENCENT") && defined("AUTOFILL_TENCENT_NAME")) {
?>
                  <li class="borderRight">
				<a href="<?php echo(AUTOFILL_TENCENT); ?>" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh3.png" />
					<div><!--3--> 
						<div>
							<label>
								<p><?php echo(AUTOFILL_TENCENT_NAME); ?></p>
							</label>
						</div>
					</div>
                  </div>
				</a>
                    </li>
<?php
	}
	if (defined("AUTOFILL_WEIBO") && defined("AUTOFILL_WEIBO_NAME")) {
?>
                    <li class="borderRight">
				<a href="<?php echo(AUTOFILL_WEIBO); ?>" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh4.png" />
					<div><!--4--> 
						<div>
							<label>
								<p><?php echo(AUTOFILL_WEIBO_NAME); ?></p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                      </li>
<?php
	}
	if (defined("AUTOFILL_TWITTER") && defined("AUTOFILL_TWITTER_NAME")) {
?>
                      <li class="borderRight">
				<a href="<?php echo(AUTOFILL_TWITTER); ?>" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh5.png" />
					<div><!--5--> 
						<div>
							<label>
								<p><?php echo(AUTOFILL_TWITTER_NAME); ?></p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                        </li>
<?php
	}
	if (defined("AUTOFILL_FACEBOOK") && defined("AUTOFILL_FACEBOOK_NAME")) {
?>
                        <li class="borderRight">
				<a href="<?php echo(AUTOFILL_FACEBOOK); ?>" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh6.png" />
					<div><!--6--> 
						<div>
							<label>
								<p><?php echo(AUTOFILL_FACEBOOK_NAME); ?></p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                          </li>
<?php
	}
	if (defined("AUTOFILL_PAYPAL")&& defined("AUTOFILL_PAYPAL_NAME")) {
?>
                          <li class="borderRight">
				<a href="<?php echo(htmlspecialchars(AUTOFILL_PAYPAL)); ?>" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh7.png" />
					<div>
						<div>
							<label>
								<p><?php echo(AUTOFILL_PAYPAL_NAME); ?></p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                            </li>
<?php
	}
	if (defined("AUTOFILL_ALIPAY")&& defined("AUTOFILL_ALIPAY_NAME")) {
?>
                            <li class="borderRight">
				<a href="<?php echo(htmlspecialchars(AUTOFILL_ALIPAY)); ?>" onclick="dashangToggle()" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh8.png"/>
					<div>
						<div>
							<label>
								<p>
									<?php echo(AUTOFILL_ALIPAY_NAME); ?>
								</p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                              </li>
                
                



<?php
	}
?>
</ul>
         <ul class="doubleCol">
                <li class="borderRight">
				<a href="<?php echo(SITE_URL); ?>ios9.php" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/Cydia/ios9.png" />
					<div>
						<div><!--10--> 
							<label>
								<p>IOS9分类</p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                  </li>    
                <li class="borderRight">
				<a href="<?php echo(SITE_URL); ?>ios10.php" target="_blank" class="">
                  <div class="test1">
				<img class="icon" src="<?php echo(SITE_URL); ?>/Cydia/ios10.png" />
					<div>
						<div><!--10--> 
							<label>
								<p>IOS10分类</p>
							</label>
						</div>
					</div>
                    </div>
				</a>
                  </li> 
        </ul>
				<a href="<?php echo(SITE_URL); ?>ios11.php" target="_blank">
				<img class="icon" src="<?php echo(SITE_URL); ?>/Cydia/ios11.png" />
					<div>
						<div>
							<label>
								<p>iOS11分类 施工中🚧</p>
								<span style="color: #6e6d6d; float:right;">
									<l style="font-size: 8px;">
										随时回来看看👻<br/>
										资源不断添加中...
									</l>
								</span>
							</label>
						</div>
					</div>
				</a>
				<a href="<?php echo(SITE_URL); ?>Sections1.php" target="_blank">
				<img class="icon" src="<?php echo(SITE_URL); ?>/Cydia/ios.png" />
					<div>
						<div>
							<label>
								<p>IOS应用插件归类🚧</p>
								<span style="color: #6e6d6d; float:right;">
									<l style="font-size: 8px;">
										随时回来看看👻<br/>
										资源不断添加中...
									</l>
								</span>
							</label>
						</div>
					</div>
				</a>                
<?php
	
	if (defined("AUTOFILL_CUSTOM")) {
?>

				<a href="<?php echo(htmlspecialchars(AUTOFILL_CUSTOM)); ?>" target="_blank" class="">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh9.png" />
					<div><!--9--> 
						<div>
							<label>
								<p><?php echo(AUTOFILL_CUSTOM_NAME); ?></p>
							</label>
						</div>
					</div>
				</a>


<?php
	}
	if (defined("AUTOFILL_CUSTOMONE")) {
?>

				<a href="<?php echo(htmlspecialchars(AUTOFILL_CUSTOMONE)); ?>" target="_blank" class="">
				<img class="icon" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/dh10.png" />
					<div><!--10--> 
						<div>
							<label>
								<p>
									<?php echo(AUTOFILL_CUSTOMONE_NAME); ?>
								</p>
							</label>
						</div>
					</div>
				</a>
 
<?php 
    }                                                 
       if (DCRM_SCREENSHOTS == 2) {
			if (!empty($package_info['ScreenShots'])){
				$screenshots_count = count(maybe_unserialize($package_info['ScreenShots']));
?> 
				<a href="<?php echo_rewrite_url('screenshot', $_GET['pid']); ?>">
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/screenshots.png" />
					<div>
						<div>
							<label>
								<p><?php echo(_n('View Screenshot', 'View Screenshots', $screenshots_count)); ?></p>
							</label>
						</div>
					</div>
				</a>
<?php
	}
?>

<?php
require_once 'qqlogin/function.php';
require_once 'qqlogin/Connect2.1/qqConnectAPI.php';	
?>                  
<?php if(!isset($_SESSION["accesstoken"]) || !isset($_SESSION["openid"])) { ?>
		      <a href="<?php echo(SITE_URL); ?>qqlogin/qqlogin.php" target="_blank">
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/sc.png">
				<div>
                      <div>
                         <label>
                            <p>登录后可使用收藏及反馈</p>
                           <span class="ui-btn3" id="isbookmark" style="float:right;"><span style="color: #808080;">登录</span></span>
                         </label>
                      </div>
                    </div>
	  </a> 

<?php } else { 
    $qc = new QC($_SESSION["accesstoken"],$_SESSION["openid"]);
    $arr = $qc->get_user_info();           
?>  
<?php
				$packages = DB::fetch_all("SELECT `ID`, `Name`, `Icon2` FROM `".DCRM_CON_PREFIX."Packages` WHERE (`Stat` = '1' AND `ID` = '".$package_id."')");
				foreach($packages as $package) {
?>                  
<?php  
if(isset($_SESSION["accesstoken"]) || isset($_SESSION["openid"])) {                  
if($row=DB::result_first("SELECT `ID`,`UserOpenID`,`Package`,`Name`,`Icon`,`TimeStamp` FROM `".DCRM_CON_PREFIX."Collection` WHERE `UserOpenID`='".$_SESSION["openid"]."' AND `Package`='".$package_info['Package']."'" )){
 ?>
              <a onclick="bookmark2()">
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/sc.png">
				<div>
                      <div>
                         <label>
                            <p>已收藏该软件包</p>
                           <span class="ui-btn3" onclick="bookmark()"  style="float:right;"><span style="color: #808080;">取消</span></span>
                         </label>
                      </div>
                    </div>
				</a>
<script type="text/javascript">
function bookmark() {
$.ajax({
type: "get",//定义提交的方法，post或
url: '<?php echo(SITE_URL); ?>qqlogin/favourite.php?UserOpenID2=<?php echo($_SESSION["openid"]); ?>&Package=<?php echo($package_info['Package']); ?>&PackageID=<?php echo($package_id); ?>&Name=<?php echo($package_info['Name']); ?>&Icon=<?php echo($package['Icon2']); ?>',
success: function(msg){
alert('取消收藏');
location.reload();
}
});
  
}
</script>       
<?php }else{?> 
              <a onclick="bookmark()">
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/sc.png">
				<div>
                      <div>
                         <label>
                            <p>未收藏该软件包</p>
                           <span class="ui-btn3" onclick="bookmark2()"  style="float:right;"><span style="color: #808080;">收藏</span></span>
                         </label>
                      </div>
                    </div>
				</a> 
 <script type="text/javascript">
function bookmark2() {
$.ajax({
type: "get",//定义提交的方法，post或
url: '<?php echo(SITE_URL); ?>qqlogin/favourite.php?UserOpenID=<?php echo($_SESSION["openid"]); ?>&Package=<?php echo($package_info['Package']); ?>&PackageID=<?php echo($package_id); ?>&Name=<?php echo($package_info['Name']); ?>&Icon=<?php echo($package['Icon2']); ?>',
success: function(msg){
alert('收藏成功');
location.reload();
}
});
}
</script>     
<?php }?>          


     
    
 <script language="javascript">
    function cookipost(){
      $.get("/qqlogin/qqlogout.php", function(result){
    	location.reload();
  	  });  
	}
</script>                  
<?php
}
?> 
<?php
 }           
?>                   
      
 <?php 
if(isset($_SESSION["accesstoken"]) || isset($_SESSION["openid"])) {      
$User=$arr["nickname"];
$Logo=$arr['figureurl_qq_2'];
$Openid=$_SESSION["openid"];
$date=date("Y-m-d h:i:s");     
$servername = "localhost";
$username = "s7420423";
$password = "kui203061";
$dbname = "s7420423";    
$conn2 = new mysqli($servername, $username, $password, $dbname);
// 检测连接
if ($conn->connect_error) {
    die("连接失败: " . $conn->connect_error);
} 
 $ip = ($ip) ? $ip : $_SERVER["REMOTE_ADDR"];  
$date=date("Y-m-d h:i:s");   
$conn = @mysql_connect("localhost","s7420423","kui203061");
if (!$conn){
    die("连接数据库失败：" . mysql_error());
}
mysql_select_db("s7420423", $conn);
mysql_query("set character set 'utf8'");   // PHP 文件为 utf-8 格式时使用
$sql = "SELECT `Openid` FROM `apt_User` WHERE `Openid`='".$_SESSION["openid"]."'";
                //得到查询结果数据集
$result = mysql_query($sql);
//循环从数据集取出数据
if ( $row = mysql_fetch_array($result) ){
}else{  
$sql2 = "INSERT INTO apt_User (ID,User,Logo,Openid,Packages,Collection,TimeStamp,IP) VALUES ('','$User','$Logo','$Openid','','','$date','$ip')";  
if ($conn2->query($sql2) === TRUE) {

} else {
 
}
} 
   }
?>     
                  <a class="theme-login" href="javascript:;">
					<img class="icon" src="<?php echo(SITE_URL); ?>icon/7.png">
					<div>
						<div>
							<label>
								<p id="source-name">一键反馈系统</p>
                              <span class="ui-btn3"  style="float:right;"><span style="color: #808080;">反馈</span></span>
							</label>
						</div>
					</div>
				</a>
                      <a>
                        <img class="icon" src="<?php echo $arr['figureurl_qq_2'];?>" style="border-radius: 50%;box-shadow:0 0 1px #AAA;padding:1px;margin-right: 1px;">
                            <div>
                                <div>
                                      <label>
                                        <p>用户名：<?php echo $arr["nickname"];?></p><i onclick="cookipost()" class="ui-btn3" style="color: #979797; float:right;">退出</i>
                                    </label>
                                </div>
                            </div>
                  </a>
               <a href="<?php echo(SITE_URL); ?>favourite.php">
				<img class="icon" src="<?php echo(SITE_URL); ?>/icon/user.png">
					<div>
						<div>
						<p>会员个人中心</p>
						</div>
					</div>
				</a> 

			
 
 <?php }?> 
       </fieldset>

              
 <script language="javascript">
    function cookipost(){
      $.get("<?php echo(SITE_URL); ?>qqlogin/qqlogout.php", function(result){
    	location.reload();
        alert('退出账户');
  	  });  
	}
</script> 


<?php
function kmtype2(){ 

$appid=AUTOFILL_WXAPPID;
$secret=AUTOFILL_WXKEYID;
$template_id=AUTOFILL_GDOPENID;
$openid=AUTOFILL_WXOPENID;
$ac = file_get_contents('https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='.$appid.'&secret='.$secret);
$wxt = json_decode($ac,true);
$url = 'https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=' . $wxt['access_token'];//access_token改成你的有效值
$time=date("Y-m-d h:i:s");   
$usertjgd=$arr['nickname'];
$ress = DB::query("SELECT * FROM `".DCRM_CON_PREFIX."User` WHERE `Openid`='".$_SESSION['openid']."'");
foreach($ress as $res){       
$nameuser=$res['User'];
  $useropen=$_SESSION['openid'];
$Feedback=$_GET['content'];  
$orderid=date('YmdHis') . rand(1000,9999);  
}
$data = array(
    'first' => array(
        'value' => '新工单提醒！',
        'color' => '#FF0000'
    ),
    'keyword1' => array(
        'value' => 'MYY-'.$orderid,
        'color' => '#FF0000'
    ),
    'keyword2' => array(
        'value' => '用户'.$nameuser.'提交了一个新的工单：'.$Feedback,
        'color' => '#FF0000'
    ),
    'keyword4' => array(
        'value' => $time,
        'color' => '#FF0000'
    ),  
    'remark' => array(
        'value' => '待处理任务！',
        'color' => '#FF0000'
    )
);
$template_msg=array('touser'=>$openid,'template_id'=>$template_id,'topcolor'=>'#FF0000','url' => 'http://mycydia.vip/wxfkhf.php?id='.$useropen,'data'=>$data); 
$curl = curl_init($url);
$header = array();
$header[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
// 不输出header头信息
curl_setopt($curl, CURLOPT_HEADER, 0);
// 伪装浏览器
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36');
// 保存到字符串而不是输出
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// post数据
curl_setopt($curl, CURLOPT_POST, 1);
// 请求数据
curl_setopt($curl,CURLOPT_POSTFIELDS,json_encode($template_msg));
$response = curl_exec($curl);
curl_close($curl);  
 //echo $response;      
} 
?>     
 <?php 
if(isset($_GET['Title'])||isset($_GET['content'])){  
if($_GET['Title']==null or $_GET['content']==null){
  echo "<script> alert('工单内容不能为空');</script>"; 
}else{ 
$OPENID=$_SESSION['openid'];  
$content=$_GET["content"];
$Title=$_GET['Title'];  
$date=date("Y-m-d h:i:s"); 

if($row=DB::result_first("SELECT ID,UserOpenID,Title,Feedback,Reply,SubmissTime,RecoveryTime,KnotOrder FROM `".DCRM_CON_PREFIX."Worklist` WHERE `KnotOrder`<'1' and `UserOpenID`='".$_SESSION['openid']."'")){   
 echo "<script> alert('您当前有工单尚未结单处理！请勿重复提交！');parent.location.href='".$_SESSION["preUrl"]."'; </script>"; 
}else{   
 
$query = DB::query("INSERT INTO `".DCRM_CON_PREFIX."Worklist` (ID,UserOpenID,Title,Feedback,Reply,SubmissTime,RecoveryTime,KnotOrder) VALUES ('','$OPENID','$Title','$content','','$date','$date','0')");
  echo "<script> alert('您的反馈我们已经收到，我们将尽快与您回复！');parent.location.href='".$_SESSION["preUrl"]."';</script>"; 
  $fkwx=kmtype2();
}
}
}
?>  
<?php
		if (!empty($package_info['GMKG'])) {
?>   
      <fieldset class="box">
                 
                <a onclick="cookgoumia2()">
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/ipa.png">
				<div>
                      <div>
                         <label>
                            <p>在线安装ipa版本</p>
                           <span class="ui-btn3" onclick="cookgoumia2()" style="float:right;"><span style="color: #32CD32;">安装</span></span>
                         </label>
                      </div>
                    </div>
				</a>
        </fieldset>
        <script language="javascript">
    function cookgoumia2(){
    	parent.location.href='<?php echo($package_info['ZXAZ']); ?>'; 
	}
  </script>  
            <fieldset class="box">

				<a>
					<img class="icon" src="<?php echo(SITE_URL); ?>icon/vip2.png" />
					<div>
						<div>
							<label>
								<p>需要购买方可使用</p>
							</label>
						</div>
					</div>
				</a>
			    <ul class=" ui-list-function ">
                    <a onclick="cookipostq<?php echo($package_info['ID']); ?>()" class="ui-btn dualPartnerReg" style="right:38px;">
                        <span style="color: #ffffff;">&nbsp;ipa版&nbsp;</span>
                    </a>
                    <a onclick="cookipost<?php echo($package_info['ID']); ?>()"  class="ui-btn2 dualPartner" style="right:111px;">
                        <span style="color: #ffffff;">&nbsp;购买&nbsp;</span>
                    </a>
                </ul>
			</fieldset>
     
  <script language="javascript">
    function cookipost<?php echo($package_info['ID']); ?>(){
    	parent.location.href='<?php echo($package_info['GMDZ']); ?>'; 
	}
  </script> 
  <script language="javascript">
    function cookipostq<?php echo($package_info['ID']); ?>(){
    	parent.location.href='http://wx.mycydia.vip'; 
	}
  </script> 
<?php 
    }                                                 
?> 
 
              <fieldset class="box">
<?php
		}
		if (!empty($package_info['Video_Preview'])) {
?>
        
		<label><p style="text-align: center"><img class="icon" src="<?php echo(SITE_URL); ?>icon/sp.png" /></p></label>
         <p style="text-align: center"><iframe class="video_iframe" style="z-index:1;" 
            src="http://v.qq.com/iframe/player.html?vid=<?php echo(htmlspecialchars($package_info['Video_Preview'])); ?>
			&amp;width=auto&amp;height=auto&amp;auto=0" allowfullscreen="" frameborder="0" height="200" width="97%"></iframe><!--腾讯视频-->
               <!--p style="text-align: center"> <iframe height=200 width=97% src='<?php echo(htmlspecialchars($package_info['Video_Preview'])); ?>' frameborder=0 'allowfullscreen'></iframe></p><优酷视频-->
<?
		//}
		//$changelogs_count = DB::result_first("SELECT count(*) FROM `".DCRM_CON_PREFIX."Packages` WHERE `Package` = '".$package_info['Package']."'");
		//if ($changelogs_count != 1){
?>
				<!--a href="<?php echo_rewrite_url('history', $_GET['pid']); ?>" id="historylink">
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/changelog.png" />
					<div>
						<div>
							<label>
								<p><?php _e('Version History'); ?></p>历史版本
							</label>
						</div>
					</div>
				</a-->

	
        
<?php
   }  
		if (defined("AUTOFILL_ADVERTISEMENT") && $isCydia) {
?>
       
			<fieldset id="advertisement" class="box">
				<div style="position: relative; text-align: center;">
					<div style="position: absolute; right: 10px; top: 2px;">
						<img src="<?php echo(SITE_URL); ?>css/closebox@2x.png" style="width: 30px; height: 29px;" onclick="hide()" />
					</div>
					<div>
						<?php echo(AUTOFILL_ADVERTISEMENT); ?>
					</div>
				</div>
			</fieldset>
<?php
		}

?>

 </fieldset>

 <?php

		if (defined("AUTOFILL_GUNDONG1") or defined("AUTOFILL_GUNDONG3") or defined("AUTOFILL_GUNDONG5") or defined("AUTOFILL_GUNDONG7") or defined("AUTOFILL_GUNDONG9")) {
?>
<label><p><?php _e('Notice'); ?></p></label>
              
    		<fieldset class="box" >
				<div>
<?php
		if (defined("AUTOFILL_GUNDONG1")) {
?>
<p class="txtwav flip"  style="color:<?php echo(AUTOFILL_GUNDONG2); ?>"><?php echo(AUTOFILL_GUNDONG1); ?></p>
<?php
		}
		if (defined("AUTOFILL_GUNDONG3")) {
?>
<p class="txtwav flip"  style="color:<?php echo(AUTOFILL_GUNDONG4); ?>"><?php echo(AUTOFILL_GUNDONG3); ?></p>
<?php
		}
		if (defined("AUTOFILL_GUNDONG5")) {
?>
 <p class="txtwav flip"  style="color:<?php echo(AUTOFILL_GUNDONG6); ?>"><?php echo(AUTOFILL_GUNDONG5); ?></p>
<?php
		}
		if (defined("AUTOFILL_GUNDONG7")) {
?>
<p class="txtwav flip"  style="color:<?php echo(AUTOFILL_GUNDONG8); ?>"><?php echo(AUTOFILL_GUNDONG7); ?></p>
<?php
		}
		if (defined("AUTOFILL_GUNDONG9")) {
?>
 <p class="txtwav flip"  style="color:<?php echo(AUTOFILL_GUNDONG10); ?>"><?php echo(AUTOFILL_GUNDONG9); ?></p>
<?php
		}
?>
				</div>
			</fieldset>
<div class="theme-popover">
     <div class="theme-poptit">
	      提交反馈意见
          <a href="javascript:;" title="关闭" class="close">×</a>
     </div>
     <div class="theme-popbod dform">
           <form class="theme-signin2"style="margin-left:-50px;margin-top:-60px;"  name="loginform" action="" method="get">
                <ol>
                     <label><strong style="margin-left:50px;">反馈标题</strong></label><label><input class="ipt" style="width:335px;"type="text" name="Title" size="20" /></label><br><br>
                     <label><strong style="margin-left:50px;">反馈内容</strong></label><label><input class="ipts" style="width:335px;" type="text" placeholder="请输入您的问题" name="content" size="20"></label>
                     <br><br><label><input class="btn2 btn-primary" style="margin-left:50px;" type="submit" name="submit" value=" 提交 " /></label>
                </ol>
           </form>
     </div>
</div>
<div class="theme-popover-mask"></div>
 <?php
		}
?>             

<?php

		if(!defined('DCRM_DESCRIPTION')) define('DCRM_DESCRIPTION', 2);
		if (DCRM_MOREINFO == 2 || DCRM_DESCRIPTION == 2 || (empty($package_info['Multi']) && DCRM_MULTIINFO == 2)) {
?>
			
<?php
			if (DCRM_MOREINFO == 2) {
?>
              <!--block>
					<p><?php _e('Version'); ?> <strong><?php echo($package_info['Version']); ?></strong> | <?php _e('Downloads'); ?> <strong><?php echo($package_info['DownloadTimes']); ?></strong></p>
					<p><?php echo(nl2br($package_info['Description'])); ?></p>
					<p><?php _e('Last Updated'); ?> <strong><?php echo($package_info['CreateStamp']); ?></strong></p>
              </block-->
<?php
			}
			if (DCRM_MOREINFO == 2 && (DCRM_DESCRIPTION == 2 || (empty($package_info['Multi']) && DCRM_MULTIINFO == 2))) echo '';
			if (DCRM_DESCRIPTION == 2 || (empty($package_info['Multi']) && DCRM_MULTIINFO == 2)) {
?>
					
<?php
			}
?>
			
<!--label><?php _e('软件作用'); ?></label-->
<block class="box1" style="background-color: #FFFFFF;">

<?php if(!empty($package_info['System_Support'])): ?><p>该插件<?php _e('Compatible with: '); ?><strong>iOS <?php echo($system_support['Minimum']); if($system_support['Maxmum']): ?> ~ iOS <?php echo($system_support['Maxmum']); endif; ?></strong></p><?php endif; ?>			
  <p style="font-size: 14px;"><span id="sitetime"></span></p><hr>  

					<p><?php echo(nl2br($package_info['Description'])); ?></p>

			</block>    
<?php
			if ($package_info['Stls'] == 1) {
?> 
      
		<link rel="stylesheet" href="../stbfq/audioplayer.css" />
		<script>
			(function(doc){var addEvent='addEventListener',type='gesturestart',qsa='querySelectorAll',scales=[1,1],meta=qsa in doc?doc[qsa]('meta[name=viewport]'):[];function fix(){meta.content='width=device-width,minimum-scale='+scales[0]+',maximum-scale='+scales[1];doc.removeEventListener(type,fix,true);}if((meta=meta[meta.length-1])&&addEvent in doc){fix();scales=[.25,1.6];doc[addEvent](type,fix,true);}}(document));
		</script>
<label><?php _e('铃声试听'); ?></label>      
<fieldset class="box" >      
		<center><div id="wrapper">
			<audio preload="auto" controls>
				<source src="../stbfq/<?php echo($package_info['Lsdz']); ?>">
			</audio>
			<script src="js/jquery.js"></script>
			<script>$( function() { $( 'audio' ).audioPlayer(); } );</script>
			</div></center>
 </fieldset> 
 <?php
			}
?>     

      
<?php
		}
		if (!empty($package_info['Multi']) && DCRM_MULTIINFO == 2) {
?>
              <label><?php _e('详细描述'); ?></label>
			<fieldset class="box" >
				<div>
					<p>
						<?php echo($package_info['Multi']); ?>
					</p>
				</div>
			</fieldset>
<?php
       }
if (defined("AUTOFILL_DUOSHUO_KEY") and defined("AUTOFILL_DUOSHUO_KEY2")) {
  $package_id = (int)DB::real_escape_string($_GET['pid']); 
?>
          
                          
<?php
		}
		if($package_info['Changelog_Older_Shows'] == 0 && !empty($package_info['Changelog'])) {
?>
			<label><p><?php _e('In this version'); ?></p></label>
			<fieldset class="changelog box">
				<a>
					<div>
						<div>
							<label>
								<p>
									<?php echo($package_info['Changelog']); ?>
								</p>
							</label>
						</div>
					</div>
				</a>
			</fieldset>

<?php
		} elseif($package_info['Changelog_Older_Shows'] != 0) {
			$changelogs = DB::fetch_all("SELECT `Version`, `Changelog` FROM `".DCRM_CON_PREFIX."Packages` WHERE `Package` = '".$package_info['Package']."' ORDER BY `Version` DESC LIMIT 0,".(int)$package_info['Changelog_Older_Shows']);
			if(count($changelogs) > 0){
?>			
			<label><p><?php _e('Changelogs'); ?></p></label>
			<fieldset class="changelog box">
<?php
				foreach ($changelogs as $changelog) {
					if(!empty($changelog['Changelog'])){
?>
				<a>
					<div>
						<div>
							<label>
								<p>
									<strong><?php echo($changelog['Version']); ?>:</strong><br/>
									<?php echo($changelog['Changelog']); ?>
								</p>
							</label>
						</div>
					</div>
				</a>
<?php
					}
				}
?>
			</fieldset>


<?php
			}
		}      
?>
		




<!--加这里-->
 <!--使用帮助--> 

<?php
                                           
		if (DCRM_DIRECT_DOW1 == 2) {
?>
              <label><?php _e('新手帮助'); ?></label>
			
              <fieldset class="box">
				<a href="<?php echo(SITE_URL); ?>help/" target="_blank">
				<img class="icon" src="<?php echo(SITE_URL); ?>manage/Speed/icon/dh.png" />
					<div>
						<div>
							<label>
								<p><?php _e('使用说明与疑难解答'); ?></p>
							</label>
							
						</div>
					</div>
				</a>
			</fieldset> 

<?php
		}
?>
			<label class="source">
				<p><?php _e('Source Info'); ?></p>
			</label>
			<fieldset class="source box">
				<a href="/">
					<img class="icon" src="<?php echo(SITE_URL); ?>CydiaIcon.png" />
					<div>
						<div>
							<label>
								<p id="source-name">
									<?php echo($release_origin); ?>
								</p>
							</label>
						</div>
					</div>
				</a>
				<div class="source-description" >
					<p><marquee scrollAmount=<?php echo(AUTOFILL_DESCRIPTION3); ?> width="98%"><span style="color:<?php echo(AUTOFILL_DESCRIPTION2); ?>"><?php echo( defined("AUTOFILL_DESCRIPTION1") ? htmlspecialchars(stripslashes(AUTOFILL_DESCRIPTION1)) : $null ); ?></marquee></p>
				</div>
			</fieldset>
              
<?php
		if (!$isCydia) {
?>
			<footer id="footer" style="display: none;">
				<p>
					<span id="id"><?php echo($package_info['Package']); ?></span>
					<br />
					<span class="source-name"><?php echo($release_origin); ?></span>&nbsp;&nbsp;
					<span id="section"><?php echo($package_info['Section']); ?></span>
					<?php if(defined("AUTOFILL_FOOTER_CODE")){ ?>
					<br />
					<span id="code"><?php echo(stripslashes(AUTOFILL_FOOTER_CODE));?></span>
					<?php } ?>
				</p>
			</footer>
<?php
		}
	}
} elseif ($index == 2) {
	if (DCRM_SCREENSHOTS == 2) {
		$package_id = (int)DB::real_escape_string($_GET['pid']);
		$screenshots_query = DB::result_first("SELECT `ScreenShots` FROM `".DCRM_CON_PREFIX."Packages` WHERE `ID` = '".$package_id."'");
		$screenshots = maybe_unserialize($screenshots_query);
		if (!empty($screenshots)) {
			$screenshots_count = count($screenshots);
?>
			<!--label><?php _e('View Screenshots'); ?></label-->
			<div class="screenshot-wrapper" style="background: transparent; position: relative;">
				<div class="background blur" style="background-image: url(<?php echo($screenshots[0]); ?>);"></div>
				<div class="horizontal-scroll-wrapper" id="scroller" style="background: transparent; position: absolute; z-index: 2;">
					<div class="horizontal-scroll-area" style="width:<?php echo($screenshots_count * 240); ?>px;">
<?php
			foreach ($screenshots as $screenshot) {
?>
						<img src="<?php echo($screenshot); ?>" />
<?php
			}
?>
					</div>
					<div class="horizontal-scroll-pips"></div>
				</div>
			</div>
<?php
		} else {
?>
			<label><?php _e('No screenshots now.'); ?></label>
<?php
		}
	} else {
?>
			<label><?php printf( __( 'The %s function is disabled.' ) , __('View Screenshots') ); ?></label>
<?php
	}
} elseif ($index == 3) {
?>
			<label><?php _e('Current Device Info'); ?></label>
<?php
	if (DCRM_REPORTING == 2) {
		$reports = DB::fetch_all("SELECT `Support`, COUNT(*) AS 'num' FROM `".DCRM_CON_PREFIX."Reports` WHERE (`Device` = '".$device_info['DEVICE']."' AND `iOS` = '".$device_info['OS']."' AND `PID` = '".$_GET['pid']."') GROUP BY `Support`");
		$reports_num = array(0, 0, 0);
		if (count($reports) > 0) {
			foreach($reports as $report)
				$reports_num[$report['Support']] = $report['num'];
		}
		$check_int = $reports_num[1] * 3 + $reports_num[2] - $reports_num[0] * 2;
		if ($check_int >= 10) {
?>
			<fieldset style="background-color: #ccffcc;" class="box">
<?php
		} elseif ($check_int <= -6) {
?>
			<fieldset style="background-color: #ffdddd;" class="box">
<?php
		} else {
?>
			<fieldset class="box">
<?php
		}
?>
				<div>
					<p>
						<?php echo($device_info['DEVICE']." &amp; iOS ".$device_info['OS']."<br />IP: ".$_SERVER['REMOTE_ADDR']); ?>
					</p>
				</div>
			</fieldset>
			<label><?php _e('Submit Your Request'); ?></label>
			<fieldset class="box">
				<a href="<?php echo_rewrite_url('report_support', $_GET['pid'], 3); ?>">
					<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/support_3.png" />
					<div>
						<div>
							<label>
								<p><?php _e('Request for updating'); ?></p>
							</label>
						</div>
					</div>
				</a>
			</fieldset>
			<label><?php _e('Compatibility Reports'); ?></label>
			<fieldset class="box">
				<a href="<?php echo_rewrite_url('report_support', $_GET['pid'], 1); ?>">
					<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/support_1.png" />
					<div>
						<div>
							<label>
								<p><?php _e('Fully Compatibile'); ?><?php echo(' ('.$reports_num[1].')'); ?></p>
							</label>
						</div>
					</div>
				</a>
				<a href="<?php echo_rewrite_url('report_support', $_GET['pid'], 0); ?>">
					<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/support_0.png" />
					<div>
						<div>
							<label>
								<p><?php _e('Partly Compatibile'); ?><?php echo(' ('.$reports_num[0].')'); ?></p>
							</label>
						</div>
					</div>
				</a>
				<a href="<?php echo_rewrite_url('report_support', $_GET['pid'], 2); ?>">
					<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/support_2.png" />
					<div>
						<div>
							<label>
								<p><?php _e('Not Compatibile'); ?><?php echo(' ('.$reports_num[2].')'); ?></p>
							</label>
						</div>
					</div>
				</a>
			</fieldset>
			<fieldset class="box">
				<div>
					<?php _e('<p><strong>The software package compatibility report is voted by the majority of users, and we generated these statistical data, for reference only.</strong></p><hr /><p>If you have compatibility issues after installation, your vote, may be able to help tens of thousands of users from safe mode and many other threats.</p>'); ?>
				</div>
			</fieldset>
              
              
<?php
	} else {
?>
			<label><?php printf( __( 'The %s function is disabled.' ) , __('Report Problems') ); ?></label>
<?php
	}
} elseif ($index == 4) {
	if (DCRM_REPORTING == 2) {
		$result = DB::result_first("SELECT COUNT(ID) FROM `".DCRM_CON_PREFIX."Reports` WHERE (`Remote` = '".DB::real_escape_string($_SERVER['REMOTE_ADDR'])."' AND `PID`='".$_GET['pid']."') LIMIT 3");
		if ($result < DCRM_REPORT_LIMIT) {
			if (!empty($_SERVER['REMOTE_ADDR']) && !empty($device_info['DEVICE']) && !empty($device_info['OS']) && $isCydia) {
				$result = DB::insert(DCRM_CON_PREFIX.'Reports', array('Remote' => DB::real_escape_string($_SERVER['REMOTE_ADDR']), 'Device' => $device_info['DEVICE'], 'iOS' => $device_info['OS'], 'Support' => $support, 'TimeStamp' => date('Y-m-d H:i:s'), 'PID' => (int)$_GET['pid']));
?>
			<fieldset style="background-color: #ccffcc;" class="box">
				<div>
					<p>
						<strong>
							<?php _e('Your report has been submitted.<br />Thanks for your support!'); ?>
						</strong>
					</p>
<?php
			} else {
?>
			<fieldset style="background-color: #ffdddd;" class="box">
				<div>
					<p>
						<strong>
							<?php _e('Please use Cydia to vote.<br />Each device is limited to vote for 2 times!'); ?>
						</strong>
					</p>
<?php
			}
		} else {
?>
			<fieldset style="background-color: #ffdddd;" class="box">
				<div>
					<p>
						<strong>
							<?php _e('You have reached the voting limit.'); ?>
						</strong>
					</p>
<?php
		}
?>
				</div>
			</fieldset>
                  
                  
<?php
	} else {
?>
			<label><?php printf( __( 'The %s function is disabled.' ) , __('Report Problems') ); ?></label>
<?php
	}
} elseif ($index == 5) {
	$historys = DB::fetch_all("SELECT `ID`, `Version`, UNIX_TIMESTAMP(`CreateStamp`), `Changelog` FROM `".DCRM_CON_PREFIX."Packages` WHERE `Package` = (SELECT `Package` FROM `".DCRM_CON_PREFIX."Packages` WHERE `ID` = '".(int)$_GET['pid']."' LIMIT 1) ORDER BY `Version` DESC LIMIT 0,20");
	if (count($historys) > 0) {
?>
			<!--<label><?php _e('Version History'); ?></label>-->
                  
<?php
		foreach ($historys as $history) {
?>
			<label><p><?php echo($history['Version']); ?>: <?php echo(date($dcrm_locale->date_format['date'], $history['UNIX_TIMESTAMP(`CreateStamp`)'])); ?></p></label>
			<fieldset class="changelog box">
				<a>
					<div>
						<div>
							<label>
								<p>
									<?php echo empty($history['Changelog'])?'- '.__('Unknown change.'):$history['Changelog']; ?>
								</p>
							</label>
						</div>
					</div>
				</a>
				<a href="<?php echo_rewrite_url('view_nohistory', $history['ID']); ?>">
					<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/changelog.png">
					<div>
						<div>
							<label>
								<p>
									<?php _e('View This Version'); ?>
								</p>
							</label>
						</div>
					</div>
				</a>
			</fieldset>

            
<?php
		}
?>
<?php
	} else {
?>
			<label><?php _e('No version history now.'); ?></label>
			<br />
<?php
	}
} elseif ($index == 6) {
	$package_id = (int)DB::real_escape_string($_GET['pid']);
	$package_info = DB::fetch_first("SELECT `Name`, `Version`, `Author`, `Sponsor`, `Maintainer` FROM `".DCRM_CON_PREFIX."Packages` WHERE `ID` = '".$package_id."' LIMIT 1");
	if (empty($package_info)) {
?>
			<block>
				<p>
					<?php _e('Invalid package!<br />Perhaps this package has been deleted by us.'); ?>
				</p>
			</block>
                  
<?php
	} else {
		if (!empty($package_info['Author'])) {
			$author_name = trim(preg_replace("#^(.+)<(.+)>#","$1", $package_info['Author']));
			$author_mail = trim(preg_replace("#^(.+)<(.+)>#","$2", $package_info['Author']));
?>
			<fieldset class="author box">
				<div>
					<p>
						<?php _e('Source manager can <strong>NOT</strong> solve the function problem of package: you <strong>MUST</strong> contact the author.'); ?>
					</p>
				</div>
				<a href="mailto:<?php echo($author_mail); ?>?subject=<?php echo(urlencode("Cydia/APT(A): ".$package_info['Name']." (".$package_info['Version'].")")); ?>" target="_blank">
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/email.png">
					<div>
						<div>
							<label><p><?php _e('Author'); ?></p></label>
							<label class="detail">
								<p><?php echo($author_name); ?></p>
							</label>
						</div>
					</div>
				</a>
			</fieldset>
     
<?php
		}
		if (!empty($package_info['Sponsor'])) {
			$sponsor_name = trim(preg_replace("#^(.+)<(.+)>#","$1", $package_info['Sponsor']));
			$sponsor_url = trim(preg_replace("#^(.+)<(.+)>#","$2", $package_info['Sponsor']));
?>
			<fieldset class="maintainer box">
				<div>
					<p>
						<?php _e('If the package is a commercial package, you can contact the sponsor to obtain commercial support.'); ?>
					</p>
				</div>
				<a href="<?php echo($sponsor_url); ?>" target="_blank">
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/email.png">
					<div>
						<div>
							<label><p><?php _e('Sponsor'); ?></p></label>
							<label class="detail">
								<p><?php echo($sponsor_name); ?></p>
							</label>
						</div>
					</div>
				</a>
			</fieldset>
                
<?php
		}
		if (!empty($package_info['Maintainer'])) {
			$maintainer_name = trim(preg_replace("#^(.+)<(.+)>#","$1", $package_info['Maintainer']));
			$maintainer_mail = trim(preg_replace("#^(.+)<(.+)>#","$2", $package_info['Maintainer']));
?>
			<fieldset class="maintainer box">
				<div>
					<p><?php _e('If you have questions when install or uninstall this package, please contact the maintainer.'); ?></p>
				</div>
				<a href="mailto:<?php echo($maintainer_mail); ?>?subject=<?php echo(urlencode("Cydia/APT(A): ".$package_info['Name']." (".$package_info['Version'].")")); ?>" target="_blank">
				<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/email.png">
					<div>
						<div>
							<label><p><?php _e('Maintainer'); ?></p></label>
							<label class="detail">
								<p><?php echo($maintainer_name); ?></p>
							</label>
						</div>
					</div>
				</a>
			</fieldset>
<?php
		}
	}
} elseif ($index == 7) {
	if (DCRM_ALLOW_FULLLIST == 2) {
		$sections = DB::fetch_first("SELECT `Name`, `Icon`, `TimeStamp` FROM `".DCRM_CON_PREFIX."Sections` WHERE `ID` = '".(int)$_GET['pid']."'");
		if (!$sections) {
?>
			<block>
				<p>
					<?php _e('Invalid section!<br />Perhaps this section has been deleted by us.'); ?>
				</p>
			</block>
                  
<?php
		} else {
?>
			<label><p><?php echo($sections['Name']); ?></p></label>
<?php
				$s_num = DB::result_first(DB::prepare("SELECT count(*) FROM `".DCRM_CON_PREFIX."Packages` WHERE (`Stat` = '1' AND `Section` = '%s')", $sections['Name']));
?>
                  
			<block><!--更多的软件包-->
					<p><?php printf( __( '<strong>%s</strong> packages in this section.' ) , $s_num ); ?></p>
			</block>
            <?php

		if (DCRM_DIRECT_DOW2 == 2) {
?>

       <div class="box" style="height: 120px;">
					<ul>
						<li id="fuck5h" style="display: none;"><a href="<?php echo(AUTOFILL_Homelunbo); ?>" target="_blank" class=""><img id="fuck5hous" class="bigpic" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/lunbo1.png"></a></li>					  
						<li id="fuck5h0" style="display: list-item;"><a href="<?php echo(AUTOFILL_Homelunbo2); ?>" target="_blank" class=" "><img class="bigpic" src="<?php echo(SITE_URL); ?>/manage/Speed/icon/lunbo2.png"></a></li>
					</ul>
				</div>
 <?php
		} 
?>    			<fieldset class="box">
  <?php                  
 if ($isCydia) { ?>
				<a href="cydia://package/mycydia.vip.cydiahome" target="_blank">
<?php				} else { ?>
				<a href="http://mycydia.vip/view/1">
<?php				} ?>                  
				<img class="icon" src="/icon/new.png" />
					<div>
						<div>
							<label>
								<p>Cydia首页 </p>
								<span style="color: #6e6d6d; float:right;">
									<l style="font-size: 8px;">
										便捷软件分类<br/>
										快速更新查看
									</l>
								</span>
							</label>
						</div>
					</div>
				</a>

			</fieldset>   
<?php
	if (!$isCydia) {
?>
<form action="../mbsearch.php"  method="get" >
<center><span class="btn"><input type="search" name="name"  placeholder="搜索你想要的软件">
  <button type="submit" ><i></i>搜索</button></span></center>
</form>
<?php
   }
?>

			<fieldset id="section" class="box"></fieldset>
			<fieldset class="box" id="loadmore" name="<?php echo($_GET['pid']); ?>">
				<a href="javascript:loadPackages();">
					<img class="icon" src="<?php echo(SITE_URL); ?>icon/default/moreinfo.png" />
					<div>
						<div>
							<label>
								<p><?php _e('More...'); ?></p>
							</label>
						</div>
					</div>
				</a>
			</fieldset>
          
              

			<script type="text/javascript">var siteurl = '<?php echo(SITE_URL); ?>';</script>

<?php
		}
	} else {
?>
			<label><?php printf( __( 'The %s function is disabled.' ) , __('Package Category') ); ?></label>
<?php
	}
}
?>
                  
		</panel>
<?php
if ($index == 2) {
?>
		<script src="<?php echo(SITE_URL); ?>js/scroll.js" type="text/javascript"></script>
<?php
}
?>
		<script src="<?php echo(SITE_URL); ?>js/main.js" type="text/javascript"></script>
<?php
if (defined("AUTOFILL_STATISTICS")) {
?>
		<div style="text-align: center; display: none;">
			<?php echo(AUTOFILL_STATISTICS); ?>
		</div>
<?php
}
?>
        
              
           

<style>
body{
	background: #450e61;
	color: #450e61;
	font-weight: 500;
	font-size: 1.05em;
	
}
a{ color: rgba(69, 14, 97, 0.6);outline: none;text-decoration: none;-webkit-transition: 0.2s;transition: 0.2s;}
a:hover,a:focus{color:#450e61;text-decoration: none;}

.zzsc{
	margin: 50px auto;
	max-width: 640px;
}
@keyframes flip-wave-0{5%{transform:translate3d(0, -16px, 0) rotate(720deg)}10%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+0){display:inline-block;animation-duration:4s;animation-name:flip-wave-0;animation-iteration-count:infinite}@keyframes flip-wave-1{10%{transform:translate3d(0, -16px, 0) rotate(720deg)}15%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+1){display:inline-block;animation-duration:4s;animation-name:flip-wave-1;animation-iteration-count:infinite}@keyframes flip-wave-2{15%{transform:translate3d(0, -16px, 0) rotate(720deg)}20%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+2){display:inline-block;animation-duration:4s;animation-name:flip-wave-2;animation-iteration-count:infinite}@keyframes flip-wave-3{20%{transform:translate3d(0, -16px, 0) rotate(720deg)}25%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+3){display:inline-block;animation-duration:4s;animation-name:flip-wave-3;animation-iteration-count:infinite}@keyframes flip-wave-4{25%{transform:translate3d(0, -16px, 0) rotate(720deg)}30%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+4){display:inline-block;animation-duration:4s;animation-name:flip-wave-4;animation-iteration-count:infinite}@keyframes flip-wave-5{30%{transform:translate3d(0, -16px, 0) rotate(720deg)}35%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+5){display:inline-block;animation-duration:4s;animation-name:flip-wave-5;animation-iteration-count:infinite}@keyframes flip-wave-6{35%{transform:translate3d(0, -16px, 0) rotate(720deg)}40%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+6){display:inline-block;animation-duration:4s;animation-name:flip-wave-6;animation-iteration-count:infinite}@keyframes flip-wave-7{40%{transform:translate3d(0, -16px, 0) rotate(720deg)}45%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+7){display:inline-block;animation-duration:4s;animation-name:flip-wave-7;animation-iteration-count:infinite}@keyframes flip-wave-8{45%{transform:translate3d(0, -16px, 0) rotate(720deg)}50%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+8){display:inline-block;animation-duration:4s;animation-name:flip-wave-8;animation-iteration-count:infinite}@keyframes flip-wave-9{50%{transform:translate3d(0, -16px, 0) rotate(720deg)}55%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+9){display:inline-block;animation-duration:4s;animation-name:flip-wave-9;animation-iteration-count:infinite}@keyframes flip-wave-10{55%{transform:translate3d(0, -16px, 0) rotate(720deg)}60%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+10){display:inline-block;animation-duration:4s;animation-name:flip-wave-10;animation-iteration-count:infinite}@keyframes flip-wave-11{60%{transform:translate3d(0, -16px, 0) rotate(720deg)}65%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+11){display:inline-block;animation-duration:4s;animation-name:flip-wave-11;animation-iteration-count:infinite}@keyframes flip-wave-12{65%{transform:translate3d(0, -16px, 0) rotate(720deg)}70%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+12){display:inline-block;animation-duration:4s;animation-name:flip-wave-12;animation-iteration-count:infinite}@keyframes flip-wave-13{70%{transform:translate3d(0, -16px, 0) rotate(720deg)}75%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+13){display:inline-block;animation-duration:4s;animation-name:flip-wave-13;animation-iteration-count:infinite}@keyframes flip-wave-14{75%{transform:translate3d(0, -16px, 0) rotate(720deg)}80%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+14){display:inline-block;animation-duration:4s;animation-name:flip-wave-14;animation-iteration-count:infinite}@keyframes flip-wave-15{80%{transform:translate3d(0, -16px, 0) rotate(720deg)}85%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+15){display:inline-block;animation-duration:4s;animation-name:flip-wave-15;animation-iteration-count:infinite}@keyframes flip-wave-16{85%{transform:translate3d(0, -16px, 0) rotate(720deg)}90%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+16){display:inline-block;animation-duration:4s;animation-name:flip-wave-16;animation-iteration-count:infinite}@keyframes flip-wave-17{90%{transform:translate3d(0, -16px, 0) rotate(720deg)}95%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+17){display:inline-block;animation-duration:4s;animation-name:flip-wave-17;animation-iteration-count:infinite}@keyframes flip-wave-18{95%{transform:translate3d(0, -16px, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+18){display:inline-block;animation-duration:4s;animation-name:flip-wave-18;animation-iteration-count:infinite}@keyframes flip-wave-19{100%{transform:translate3d(0, -16px, 0) rotate(720deg)}105%{transform:translate3d(0, 0, 0) rotate(720deg)}100%{transform:translate3d(0, 0, 0) rotate(720deg)}}.txtwav.flip :nth-child(20n+19){display:inline-block;animation-duration:4s;animation-name:flip-wave-19;animation-iteration-count:infinite}@keyframes slow-wave{from{transform:translateY(0)}to{transform:translateY(-10px)}}.txtwav.slow span{display:inline-block;animation-duration:3s;animation-name:slow-wave;animation-iteration-count:infinite;animation-direction:alternate}.txtwav.slow :nth-child(25n+0){animation-delay:-6s}.txtwav.slow :nth-child(25n+1){animation-delay:-5.76s}.txtwav.slow :nth-child(25n+2){animation-delay:-5.52s}.txtwav.slow :nth-child(25n+3){animation-delay:-5.28s}.txtwav.slow :nth-child(25n+4){animation-delay:-5.04s}.txtwav.slow :nth-child(25n+5){animation-delay:-4.8s}.txtwav.slow :nth-child(25n+6){animation-delay:-4.56s}.txtwav.slow :nth-child(25n+7){animation-delay:-4.32s}.txtwav.slow :nth-child(25n+8){animation-delay:-4.08s}.txtwav.slow :nth-child(25n+9){animation-delay:-3.84s}.txtwav.slow :nth-child(25n+10){animation-delay:-3.6s}.txtwav.slow :nth-child(25n+11){animation-delay:-3.36s}.txtwav.slow :nth-child(25n+12){animation-delay:-3.12s}.txtwav.slow :nth-child(25n+13){animation-delay:-2.88s}.txtwav.slow :nth-child(25n+14){animation-delay:-2.64s}.txtwav.slow :nth-child(25n+15){animation-delay:-2.4s}.txtwav.slow :nth-child(25n+16){animation-delay:-2.16s}.txtwav.slow :nth-child(25n+17){animation-delay:-1.92s}.txtwav.slow :nth-child(25n+18){animation-delay:-1.68s}.txtwav.slow :nth-child(25n+19){animation-delay:-1.44s}.txtwav.slow :nth-child(25n+20){animation-delay:-1.2s}.txtwav.slow :nth-child(25n+21){animation-delay:-.96s}.txtwav.slow :nth-child(25n+22){animation-delay:-.72s}.txtwav.slow :nth-child(25n+23){animation-delay:-.48s}.txtwav.slow :nth-child(25n+24){animation-delay:-.24s}@keyframes bounce-wave{from{transform:translateY(0)}to{transform:translateY(-10px)}}.txtwav.bounce span{display:inline-block;animation-duration:.3s;animation-name:bounce-wave;animation-iteration-count:infinite;animation-direction:alternate}.txtwav.bounce :nth-child(25n+0){animation-delay:-.6s}.txtwav.bounce :nth-child(25n+1){animation-delay:-.576s}.txtwav.bounce :nth-child(25n+2){animation-delay:-.552s}.txtwav.bounce :nth-child(25n+3){animation-delay:-.528s}.txtwav.bounce :nth-child(25n+4){animation-delay:-.504s}.txtwav.bounce :nth-child(25n+5){animation-delay:-.48s}.txtwav.bounce :nth-child(25n+6){animation-delay:-.456s}.txtwav.bounce :nth-child(25n+7){animation-delay:-.432s}.txtwav.bounce :nth-child(25n+8){animation-delay:-.408s}.txtwav.bounce :nth-child(25n+9){animation-delay:-.384s}.txtwav.bounce :nth-child(25n+10){animation-delay:-.36s}.txtwav.bounce :nth-child(25n+11){animation-delay:-.336s}.txtwav.bounce :nth-child(25n+12){animation-delay:-.312s}.txtwav.bounce :nth-child(25n+13){animation-delay:-.288s}.txtwav.bounce :nth-child(25n+14){animation-delay:-.264s}.txtwav.bounce :nth-child(25n+15){animation-delay:-.24s}.txtwav.bounce :nth-child(25n+16){animation-delay:-.216s}.txtwav.bounce :nth-child(25n+17){animation-delay:-.192s}.txtwav.bounce :nth-child(25n+18){animation-delay:-.168s}.txtwav.bounce :nth-child(25n+19){animation-delay:-.144s}.txtwav.bounce :nth-child(25n+20){animation-delay:-.12s}.txtwav.bounce :nth-child(25n+21){animation-delay:-.096s}.txtwav.bounce :nth-child(25n+22){animation-delay:-.072s}.txtwav.bounce :nth-child(25n+23){animation-delay:-.048s}.txtwav.bounce :nth-child(25n+24){animation-delay:-.024s}@keyframes vibe-wave{from{transform:translateY(0)}to{transform:translateY(4px)}}.txtwav.vibe span{display:inline-block;animation-duration:.08s;animation-name:vibe-wave;animation-iteration-count:infinite;animation-direction:alternate}.txtwav.vibe :nth-child(10n+0){animation-delay:-.16s}.txtwav.vibe :nth-child(10n+1){animation-delay:-.144s}.txtwav.vibe :nth-child(10n+2){animation-delay:-.128s}.txtwav.vibe :nth-child(10n+3){animation-delay:-.112s}.txtwav.vibe :nth-child(10n+4){animation-delay:-.096s}.txtwav.vibe :nth-child(10n+5){animation-delay:-.08s}.txtwav.vibe :nth-child(10n+6){animation-delay:-.064s}.txtwav.vibe :nth-child(10n+7){animation-delay:-.048s}.txtwav.vibe :nth-child(10n+8){animation-delay:-.032s}.txtwav.vibe :nth-child(10n+9){animation-delay:-.016s}

</style>
</head>
<body>
  <?php
	if (defined("AUTOFILL_BAIDUTJ")) {
?>
<?php echo(AUTOFILL_BAIDUTJ); ?>
  <?php
	}
?>
<script type="text/javascript">
(function(){var n=document.getElementsByClassName("txtwav");for(var e=0,t=n.length;e<t;e++){var a=n[e],r=a.textContent.trim();a.innerHTML=null;i(a,r)}function i(n,e){for(var t in e){var a=document.createElement("span");a.innerHTML=e[t]===" "?"&nbsp;":e[t];n.appendChild(a)}}})();
</script>
  <script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
